public void A_class_should_be_able_to_create_a_clone_with_two_property_set_using_equal_equal(
     Customer myClass, int newIntValue, string newStrValue)
 {
     var ret = myClass.With(m => m.Id == newIntValue && m.Name == newStrValue);
     Assert.Equal(newIntValue, ret.Id);
     Assert.Equal(newStrValue, ret.Name);
 }
 public void A_class_should_be_able_to_create_a_clone_with_a_property_set_using_equal_equal_and_another_propertyvalue(
     Customer anInstance, Customer anotherInstance)
 {
     var ret = anotherInstance.With(m => m.Id == anInstance.Id);
     Assert.Equal(anInstance.Id, ret.Id);
     Assert.Equal(anotherInstance.Name, ret.Name);
 }
 public void A_class_should_be_able_to_create_a_clone_with_a_property_set(
     Customer myClass, int newValue)
 {
     var ret = myClass.With(m => m.Id, newValue);
     Assert.Equal(newValue, ret.Id);
     Assert.Equal(myClass.Name, ret.Name);
 }
Exemple #4
0
 public void A_class_should_throw_a_decent_exception_when_changing_the_order(
     Customer anInstance, Customer anotherInstance)
 {
     Assert.Throws <ShouldBeAnExpressionLeftToRightException>(() =>
     {
         anInstance.With(m => anotherInstance.Id == m.Id);
     });
 }
Exemple #5
0
        public void A_class_should_be_able_to_create_a_clone_with_a_property_set_using_equal_equal_and_another_propertyvalue(
            Customer anInstance, Customer anotherInstance)
        {
            var ret = anotherInstance.With(m => m.Id == anInstance.Id);

            Assert.Equal(anInstance.Id, ret.Id);
            Assert.Equal(anotherInstance.Name, ret.Name);
        }
Exemple #6
0
        public void A_class_should_be_able_to_create_a_clone_with_two_property_set_using_equal_equal(
            Customer myClass, int newIntValue, string newStrValue)
        {
            var ret = myClass.With(m => m.Id == newIntValue && m.Name == newStrValue);

            Assert.Equal(newIntValue, ret.Id);
            Assert.Equal(newStrValue, ret.Name);
        }
Exemple #7
0
        public void A_class_should_be_able_to_create_a_clone_with_a_property_set(
            Customer myClass, int newValue)
        {
            var ret = myClass.With(m => m.Id, newValue);

            Assert.Equal(newValue, ret.Id);
            Assert.Equal(myClass.Name, ret.Name);
        }
 public void A_class_should_be_able_to_create_a_clone_with_a_property_set_using_eql(
     Customer instance, int newInt)
 {
     Customer ret = instance.With()
         .Eql(m => m.Id, newInt);
     Assert.Equal(newInt, ret.Id);
     Assert.Equal(instance.Name, ret.Name);
 }
Exemple #9
0
        public void A_class_should_be_able_to_create_a_clone_with_a_property_set_using_eql(
            Customer instance, int newInt)
        {
            Customer ret = instance.With()
                           .Eql(m => m.Id, newInt);

            Assert.Equal(newInt, ret.Id);
            Assert.Equal(instance.Name, ret.Name);
        }
 public void A_class_should_throw_a_decent_exception_when_changing_the_order(
     Customer anInstance, Customer anotherInstance)
 {
     Assert.Throws<ShouldBeAnExpressionLeftToRightException>(() =>
     {
         anInstance.With(m => anotherInstance.Id == m.Id);
     });
 }