Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void Collections_HashSetOfNamedMutable_add_one_model_instance_just_once_test()
        {
            HashSetOfNamedMutable <Model> hs = new HashSetOfNamedMutable <Model>();

            Assert.AreEqual(0, hs.Count);

            Model model = new Model("Jack", 35);

            hs.Add(model);

            Assert.AreEqual(1, hs.Count);

            hs.Add(model);

            Assert.AreEqual(1, hs.Count);
        }
Esempio n. 3
0
        public void Collections_HashSetOfNamedMutable_add_updates_existing_model_fields_test()
        {
            HashSetOfNamedMutable <Model> hs = new HashSetOfNamedMutable <Model>();

            Assert.AreEqual(0, hs.Count);

            Model model = new Model("Jack", 35);

            hs.Add(model);
            Assert.AreEqual(1, hs.Count);

            Model update = new Model("Jack", 88);

            hs.Add(update);
            Assert.AreEqual(1, hs.Count);
            Assert.AreEqual(88, model.Value);
        }
Esempio n. 4
0
 public SymbolDataContext()
 {
     this.SymbolSettings = new HashSetOfNamedMutable <SymbolSettings>();
     this.SymbolSummary  = new HashSetOfNamedMutable <SymbolSummary>();
 }