Exemple #1
0
        public ActionResult <StewardessDto> Get(int id)
        {
            var entity = _stewardessesSrvice.GetById(id);

            if (entity == null)
            {
                return(NotFound());
            }

            return(entity);
        }
Exemple #2
0
        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);
        }