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"); }
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(); }
public SpecimenController(SpecimenService ss) { specimenService = ss; }