public async Task <DataBase.ViewModels.Hospital> CreateAsync( [FromBody] DataBase.Models.Hospital hospital, CancellationToken ct ) { var result = await _hospitalServices.CreateAsync(hospital, ct); return(result.ToViewModel()); }
public async Task CreateTestAsync() { var hospital = await business.CreateAsync( new Hospital() { Nome = "S.Joao" }, CancellationToken.None ); Assert.AreEqual(hospital.Nome, "S.Joao"); }