public void AddPlant(long id, string friendlyName, string sciName) { _service.AddPlantAsync(new PlantModel() { Id = id, FriendlyName = friendlyName, ScientificName = sciName }); Assert.IsTrue(_service.GetPlant(id) != null); Assert.IsTrue(_service.PlantExists(id)); }
public async Task <ActionResult <PlantModel> > PostPlantModel(PlantModel plantModel) { await _plantService.AddPlantAsync(plantModel); return(CreatedAtAction(nameof(GetPlantModel), new { id = plantModel.Id }, plantModel)); }