Esempio n. 1
0
        public void RaiseErrorsChanged_GivenAValidPropertyName_ErrorsChangedEventReportsPropertyChange()
        {
            var personDto = new TestPersonDto { FirstName = "John", LastName = "Wayne" };
            string name = string.Empty;
            personDto.ErrorsChanged += ( s, e ) => name = e.PropertyName;
            personDto.RaiseErrorsChanged ( "FirstName" );

            Assert.AreSame ( name, "FirstName" );
        }
Esempio n. 2
0
 public void RaiseErrorsChanged_GivenAnInvalidPropertyName_RaisesPropertyNotFoundException()
 {
     var personDto = new TestPersonDto { FirstName = "John", LastName = "Wayne" };
     personDto.RaiseErrorsChanged ( "Dummy" );
 }