TrackerTests.cs 1.3 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", "Trackers")]
  18. #if !(NET20 || NET40)
  19. [Collection("RedmineCollection")]
  20. #endif
  21. public class TrackerTests
  22. {
  23. public TrackerTests(RedmineFixture fixture)
  24. {
  25. this.fixture = fixture;
  26. }
  27. private readonly RedmineFixture fixture;
  28. [Fact]
  29. public void RedmineTrackers_ShouldGetAllTrackers()
  30. {
  31. const int NUMBER_OF_TRACKERS = 2;
  32. var trackers = fixture.RedmineManager.GetObjects<Tracker>();
  33. Assert.NotNull(trackers);
  34. Assert.True(trackers.Count == NUMBER_OF_TRACKERS, "Trackers count(" + trackers.Count + ") != " + NUMBER_OF_TRACKERS);
  35. }
  36. }
  37. }