예제 #1
0
        public void CheckCollectionOnEmpty()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();

            Assert.IsFalse(setz.IsEmpty());
        }
예제 #2
0
        public void CheckEmptyCollectionOnEmpty()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClass();

            Assert.IsTrue(setz.IsEmpty());
        }
예제 #3
0
        public void CheckCount()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();

            Assert.AreEqual(ini.GetCount, setz.GetCount);
        }
예제 #4
0
        public void EqualsItemFalse()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();
            object         obj  = new object();

            Assert.IsFalse(setz.Exist(obj));
        }
예제 #5
0
        public void AddedObject()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();

            setz.Add(new object());

            Assert.AreEqual(3, setz.GetCount);
        }
예제 #6
0
        public void EqualsPredicateItemTrue()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();
            object         obj  = new object();

            setz.Add(obj);

            Assert.IsTrue(setz.Exist(e => e.Equals(obj)));
        }
예제 #7
0
        public void GetItem()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();
            object         obj  = new object();

            setz.Add(obj);

            Assert.AreEqual(obj, setz.GetItem(2));
        }
예제 #8
0
        public void DeleteObjectFromEmptyCollection()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClass();
            object         obj  = new object();

            setz.Delete(obj);

            Assert.AreEqual(0, setz.GetCount);
        }
예제 #9
0
        public void CheckEqualObject()
        {
            Initialize     ini  = new Initialize();
            ISets <object> setz = ini.CreateSetClassWithCollection();
            object         obj  = new object();

            try
            {
                setz.Add(obj);
                setz.Add(obj);
            }
            catch (ExistException e)
            {
                Assert.AreEqual("Equals entity", e.Message);
            }
        }