Пример #1
0
        public async Task UpdateSalon_SetsNameInDb()
        {
            // Arrange
            var lCreatedEntity = await salonRepository.Add(new Entities.SalonEntity {
                Name = "test", Country = EntitiesHelper.GetCountry()
            });

            lCreatedEntity.Name = "fred";

            // Act
            await salonRepository.Update(lCreatedEntity);

            // Assert
            var lResult = await salonRepository.GetById(lCreatedEntity.Id);

            Assert.IsNotNull(lResult);
            Assert.IsTrue(lResult.Id > 0);
            Assert.AreEqual("fred", lResult.Name);
        }