public void Collections_HashSetOfNamedMutable_update_existing_model_fields_test() { HashSetOfNamedMutable <Model> hs = new HashSetOfNamedMutable <Model>(); Assert.AreEqual(0, hs.Count); Model model = new Model("Jack", 35); hs.Update(model); Assert.AreEqual(1, hs.Count); Model update = new Model("Jack", 88); hs.Update(update); Assert.AreEqual(1, hs.Count); Assert.AreEqual(88, model.Value); }
public void Collections_HashSetOfNamedMutable_add_new_model_instance_with_update_method_test() { HashSetOfNamedMutable <Model> hs = new HashSetOfNamedMutable <Model>(); Assert.AreEqual(0, hs.Count); hs.Update(new Model("Jack", 35)); Assert.AreEqual(1, hs.Count); }