Пример #1
0
        public void PersonBl_GetById_Should_Return_NewObject()
        {
            // Arrange
            A.CallTo(() => _personRepository.GetById(PersonId)).Returns(null);
            var personBl = new PersonBl(_uow);

            // Act
            var sut = personBl.GetById(PersonId);

            // Assert
            bool isEqual = AreObjectsEqualHelper.IsEqual(sut, _personDto);

            Assert.AreEqual(isEqual, true);
        }
Пример #2
0
        public void PersonBl_GetById_Should_Return_Person()
        {
            // Arrange
            A.CallTo(() => _personRepository.GetById(PersonId)).Returns(_person);
            var personBl = new PersonBl(_uow);

            // Act
            var sut             = personBl.GetById(PersonId);
            var actualPersonDto = personBl.FromEntityToModel(_person);

            // Assert
            bool isEqual = AreObjectsEqualHelper.IsEqual(sut, actualPersonDto);

            Assert.AreEqual(isEqual, true);
        }