public void TestTestModelToOnce() { // Arrange var testModel = CreateLoadedTestModel(); var onceModel = new OnceModel { String = "Came From Behind" }; // Act ModelMerge.MergeProperties(testModel, onceModel, MergeMode.All); // Assert Assert.IsTrue(testModel.String.Equals(onceModel.String)); }
public void TestModelMergeOnce() { // Arrange var firstValue = "Hello"; var secondValue = "World"; var model = new OnceModel { String = null }; var newValues1 = new OnceModel { String = firstValue }; var newValues2 = new OnceModel { String = secondValue }; // Act ModelMerge.MergeProperties(model, newValues1, MergeMode.Update); ModelMerge.MergeProperties(model, newValues2, MergeMode.Update); // Assert Assert.IsTrue(model.String.Equals(newValues1.String)); }