public async void GetByIdAsync_ValidId_Plant() { using (var ctx = new TestDataContext()) { SeedPlants(ctx); var service = new PlantService(ctx); var plant = await service.GetByIdAsync(0); Assert.Null(plant); } }
public async void GetByIdAsync_InvalidId_Plant() { using (var ctx = new TestDataContext()) { SeedPlants(ctx); var service = new PlantService(ctx); var plant = await service.GetByIdAsync(0); Assert.IsType <Plant>(plant); Assert.Equal(1, plant.PlantId); } }