public void should_be_able_to_create_a_clone_using_equal_equal(
     AClassWithManyProperties instance, int newValue,string newValue2, string newValue3, string newValue4)
 {
     var ret = instance.With(m =>
         m.MyProperty == newValue
         && m.MyProperty2 == newValue2
         && m.MyProperty3 == newValue3
         && m.MyProperty4 == newValue4);
     Assert.Equal(newValue, ret.MyProperty);
     Assert.Equal(newValue2, ret.MyProperty2);
     Assert.Equal(newValue3, ret.MyProperty3);
     Assert.Equal(newValue4, ret.MyProperty4);
 }
 public void should_be_able_to_create_a_clone_using_builder(
     AClassWithManyProperties instance, int newValue, string newValue2, string newValue3, string newValue4)
 {
     AClassWithManyProperties ret = instance.With()
         .Eql(m => m.MyProperty, newValue)
         .Eql(m => m.MyProperty2, newValue2)
         .Eql(m => m.MyProperty3, newValue3)
         .Eql(m => m.MyProperty4, newValue4);
     Assert.Equal(newValue, ret.MyProperty);
     Assert.Equal(newValue2, ret.MyProperty2);
     Assert.Equal(newValue3, ret.MyProperty3);
     Assert.Equal(newValue4, ret.MyProperty4);
 }
Exemple #3
0
        public void should_be_able_to_create_a_clone_using_builder(
            AClassWithManyProperties instance, int newValue, string newValue2, string newValue3, string newValue4)
        {
            AClassWithManyProperties ret = instance.With()
                                           .Eql(m => m.MyProperty, newValue)
                                           .Eql(m => m.MyProperty2, newValue2)
                                           .Eql(m => m.MyProperty3, newValue3)
                                           .Eql(m => m.MyProperty4, newValue4);

            Assert.Equal(newValue, ret.MyProperty);
            Assert.Equal(newValue2, ret.MyProperty2);
            Assert.Equal(newValue3, ret.MyProperty3);
            Assert.Equal(newValue4, ret.MyProperty4);
        }
Exemple #4
0
        public void should_be_able_to_create_a_clone_using_equal_equal(
            AClassWithManyProperties instance, int newValue, string newValue2, string newValue3, string newValue4)
        {
            var ret = instance.With(m =>
                                    m.MyProperty == newValue &&
                                    m.MyProperty2 == newValue2 &&
                                    m.MyProperty3 == newValue3 &&
                                    m.MyProperty4 == newValue4);

            Assert.Equal(newValue, ret.MyProperty);
            Assert.Equal(newValue2, ret.MyProperty2);
            Assert.Equal(newValue3, ret.MyProperty3);
            Assert.Equal(newValue4, ret.MyProperty4);
        }