Exemple #1
0
        public void Change_Property_From_Value_To_Null_Should_Not_Throw()
        {
            var trackable = new Order {
                Id = 321, Address = new Address()
            }.AsTrackable();

            trackable.Invoking(o => o.Address = null).Should().NotThrow <NullReferenceException>();
        }
Exemple #2
0
        public void When_AsTrackable_CastToIChangeTrackable_Should_Not_Throw_InvalidCastException()
        {
            var order = Helper.GetOrder();

            Order trackable = order.AsTrackable();

            trackable.Invoking(o => o.CastToIChangeTrackable()).Should().NotThrow <InvalidCastException>();
        }
Exemple #3
0
        public void Change_Property_From_Null_To_Value_Should_Not_Throw()
        {
            var trackable = new Order {
                Id = 321, CustomerNumber = null
            }.AsTrackable();

            trackable.Invoking(o => o.CustomerNumber = "Test").Should().NotThrow <NullReferenceException>();
        }
        public void Change_Property_From_Null_To_Value_Should_Not_Throw()
        {
            var trackable = new Order { Id = 321, CustomerNumber = null }.AsTrackable();

            trackable.Invoking(o => o.CustomerNumber = "Test").ShouldNotThrow<NullReferenceException>();
        }