Пример #1
0
        public void Binding_CanCreate()
        {
            Binding binding = NewBinding <Person, PersonDto>();
            var     actual  = BindingValidator.IsValid(binding);

            Assert.AreEqual(true, actual);
        }
Пример #2
0
        public void Binding_Action_CanMap()
        {
            Binding   binding   = NewBinding <Person, PersonDto>();
            PersonDto personDto = new PersonDto();

            if (BindingValidator.IsValid(binding))
            {
                binding.GetAction().Invoke(_person, personDto);
            }

            bool actual =
                personDto.FirstName.Equals(_person.FirstName) &&
                personDto.LastName.Equals(_person.LastName) &&
                personDto.Phone.Equals(_person.Phone) &&
                personDto.Nickname.Equals(_person.Nickname);

            Assert.AreEqual(true, actual);
        }