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>(); }
public void When_Adding_To_Colletion_Via_Indexer_Status_Should_Be_Added() { IList<Order> list = Helper.GetOrdersIList(); var trackable = list.AsTrackable(); trackable[0] = new Order { Id = 999999999, CustomerNumber = "Customer" }; trackable.Single(o => o.Id == 999999999).CastToIChangeTrackable().ChangeTrackingStatus.Should().Be(ChangeStatus.Added); }