public void Single_Add_Is_Overwritten() { // Add property _intsAndString.Include(x => x.Int1); // Property now exists, and should be overwritten _intsAndString.Include(x => x.Int1); // Total should be 1 Assert.AreEqual(_intsAndString.Names.Count(), 1, "Expected the set have a size of 1"); }
public void AddToExisting() { // Start with a collection, ints only _intsAndString.IncludeAll <int>(); // String shouldnt be included yet Assert.IsFalse(_intsAndString.Names.Any(x => x.Equals("StringProp")), "Contained StringProp when only ints were expected"); _intsAndString.Include(x => x.StringProp); // String should now be included Assert.IsTrue(_intsAndString.Names.Any(x => x.Equals("StringProp")), "Did not contain StringProp"); }