IssuePriorityTests.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. Copyright 2011 - 2022 Adrian Popescu
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. using Redmine.Net.Api.Types;
  14. using Xunit;
  15. namespace Padi.RedmineApi.Tests.Tests.Sync
  16. {
  17. [Trait("Redmine-Net-Api", "IssuePriorities")]
  18. #if !(NET20 || NET40)
  19. [Collection("RedmineCollection")]
  20. #endif
  21. public class IssuePriorityTests
  22. {
  23. public IssuePriorityTests(RedmineFixture fixture)
  24. {
  25. this.fixture = fixture;
  26. }
  27. private readonly RedmineFixture fixture;
  28. [Fact]
  29. public void Should_Get_All_Issue_Priority()
  30. {
  31. const int NUMBER_OF_ISSUE_PRIORITIES = 4;
  32. var issuePriorities = fixture.RedmineManager.GetObjects<IssuePriority>();
  33. Assert.NotNull(issuePriorities);
  34. Assert.True(issuePriorities.Count == NUMBER_OF_ISSUE_PRIORITIES,
  35. "Issue priorities count(" + issuePriorities.Count + ") != " + NUMBER_OF_ISSUE_PRIORITIES);
  36. }
  37. }
  38. }