public ActionResult <StewardessDto> Get(int id) { var entity = _stewardessesSrvice.GetById(id); if (entity == null) { return(NotFound()); } return(entity); }
public void Update_Valid() { //arange var entity = new StewardessDto { Id = 1, CrewId = 1, FirstName = Guid.NewGuid().ToString(), LastName = "Ivanova", Birthday = new DateTime(1987, 1, 24) }; //act service.Update(entity); var result = service.GetById(1); //assert Assert.NotNull(result); Assert.AreEqual(result.FirstName, entity.FirstName); }