Пример #1
0
        public async Task TestGetSpecimenAsync()
        {
            var specimenService = new SpecimenService(_mockSpecimenRepository.Object, _mockSpecimenIndex.Object);
            var specimen        = await specimenService.GetSpecimenAsync(1, FakeUsers.GetPublic().AsModel());

            specimen.Should().NotBeNull("it exists");
        }
Пример #2
0
        public async Task TestFindSpecimens()
        {
            var specimenService = new SpecimenService(_mockSpecimenRepository.Object, _mockSpecimenIndex.Object);
            var specimenResult  = await specimenService.FindSpecimens(new SpecimenFindParams
            {
                SearchText    = "Liatris spicata",
                Skip          = 0,
                Take          = 10,
                SortBy        = "",
                SortDirection = SortDirection.None,
            },
                                                                      FakeUsers.GetPublic().AsModel());

            specimenResult.Results.Should().NotBeNull("it exists");
            specimenResult.Count.Should().Be(2);
            specimenResult.Results.Should().HaveCount(2);
            specimenResult.Results.First().InventoryItem.Should().NotBeNull();
            specimenResult.Results.First().InventoryItem.Inventory.Should().NotBeNull();
            specimenResult.Results.First().Lifeform.Should().NotBeNull();
        }
Пример #3
0
 public SpecimenController(SpecimenService ss)
 {
     specimenService = ss;
 }