Exemple #1
0
        public void ValidtionTest_WrongDependentPropertyType()
        {
            WrongPerson person = new WrongPerson();

            person.IsCouple = "Something";
            person.Validate();
        }
        public void WrongEventSenderTest()
        {
            WrongPerson person = new WrongPerson();

            AssertHelper.ExpectedException <AssertException>(() =>
                                                             AssertHelper.PropertyChangedEvent(person, x => x.Name, () => person.RaiseWrongNamePropertyChanged()));
        }
Exemple #3
0
            public void ValidationTest_DependentPropertyNotExist()
            {
                WrongPerson person = new WrongPerson()
                {
                    IsCouple = true
                };

                person.Validate();
            }
        public void PropertyChangedEventTest2()
        {
            WrongPerson wrongPerson = new WrongPerson();
            AssertHelper.ExpectedException<AssertException>(() =>
                AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Name, () => wrongPerson.Name = "Luke"));

            AssertHelper.ExpectedException<AssertException>(() =>
                AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Age, () => wrongPerson.Age = 31));

            AssertHelper.ExpectedException<AssertException>(() =>
                AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Weight, () => wrongPerson.Weight = 80));

            Person person = new Person();
            AssertHelper.ExpectedException<ArgumentException>(() =>
                AssertHelper.PropertyChangedEvent(person, x => x.Name.Length, () => person.Name = "Luke"));
        }
        public void PropertyChangedEventTest2()
        {
            WrongPerson wrongPerson = new WrongPerson();

            AssertHelper.ExpectedException <AssertException>(() =>
                                                             AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Name, () => wrongPerson.Name = "Luke"));

            AssertHelper.ExpectedException <AssertException>(() =>
                                                             AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Age, () => wrongPerson.Age = 31));

            AssertHelper.ExpectedException <AssertException>(() =>
                                                             AssertHelper.PropertyChangedEvent(wrongPerson, x => x.Weight, () => wrongPerson.Weight = 80));

            Person person = new Person();

            AssertHelper.ExpectedException <ArgumentException>(() =>
                                                               AssertHelper.PropertyChangedEvent(person, x => x.Name.Length, () => person.Name = "Luke"));
        }
 public void WrongEventSenderTest()
 {
     WrongPerson person = new WrongPerson();
     AssertHelper.ExpectedException<AssertException>(() =>
         AssertHelper.PropertyChangedEvent(person, x => x.Name, () => person.RaiseWrongNamePropertyChanged()));
 }
Exemple #7
0
        public void WrongEventSenderTest()
        {
            WrongPerson person = new WrongPerson();

            AssertHelper.IsRaisePropertyChangedEvent(person, x => x.Name, () => person.RaiseWrongNamePropertyChanged());
        }
Exemple #8
0
        public void PropertyNameRaise2Times()
        {
            WrongPerson wrongPerson = new WrongPerson();

            AssertHelper.IsRaisePropertyChangedEvent(wrongPerson, x => x.Weight, () => wrongPerson.Weight = 80);
        }
Exemple #9
0
        public void NotRisePropertyName()
        {
            WrongPerson wrongPerson = new WrongPerson();

            AssertHelper.IsRaisePropertyChangedEvent(wrongPerson, x => x.Age, () => wrongPerson.Age = 31);
        }
Exemple #10
0
        public void RiseWrongPropertyName()
        {
            WrongPerson wrongPerson = new WrongPerson();

            AssertHelper.IsRaisePropertyChangedEvent(wrongPerson, x => x.Name, () => wrongPerson.Name = "Luke");
        }
        public void WrongEventSenderTest()
        {
            WrongPerson person = new WrongPerson();

            AssertHelper.IsRaiseErrorChangedEvent(person, () => person.RaiseWrongNameErrorsChanged());
        }
 public void WrongEventSenderTest()
 {
     WrongPerson person = new WrongPerson();
     AssertHelper.IsRaiseErrorChangedEvent(person, x => x.Name, () => person.RaiseWrongNameErrorsChanged());
 }
 public void RiseWrongPropertyName()
 {
     WrongPerson wrongPerson = new WrongPerson();
     AssertHelper.IsRaiseErrorChangedEvent(wrongPerson, x => x.Name, () => wrongPerson.Name = "Luke");
 }
 public void PropertyNameRaise2Times()
 {
     WrongPerson wrongPerson = new WrongPerson();
     AssertHelper.IsRaiseErrorChangedEvent(wrongPerson, x => x.Weight, () => wrongPerson.Weight = 80);
 }
 public void NotRisePropertyName()
 {
     WrongPerson wrongPerson = new WrongPerson();
     AssertHelper.IsRaiseErrorChangedEvent(wrongPerson, x => x.Age, () => wrongPerson.Age = 31);
 }
 public void ValidtionTest_WrongDependentPropertyType()
 {
     WrongPerson person = new WrongPerson();
     person.IsCouple = "Something";
     person.Validate();
 }