public void AddWithKeyAndValueTest()
 {
     var sht = new SimpleHashtable();
     sht.Add(1, "value for 1");
     Assert.IsTrue(sht.Count == 1);
     Assert.IsInstanceOfType(sht[0], typeof(Node));
 }
        public void ContainsTest()
        {
            var sht = new SimpleHashtable();
            var node = new Node(1, "value for 1");
            sht.Add(node);

            Assert.IsTrue(sht.Contains(node));
        }
 public void AddWithObjectTest()
 {
     var sht = new SimpleHashtable();
     var node = new Node(1, "value for 1");
     sht.Add(node);
     Assert.IsTrue(sht.Count == 1);
     Assert.IsInstanceOfType(sht[0], typeof(Node));
 }
예제 #4
0
        public void AddWithKeyAndValueTest()
        {
            var sht = new SimpleHashtable();

            sht.Add(1, "value for 1");
            Assert.IsTrue(sht.Count == 1);
            Assert.IsInstanceOfType(sht[0], typeof(Node));
        }
예제 #5
0
        public void ContainsTest()
        {
            var sht  = new SimpleHashtable();
            var node = new Node(1, "value for 1");

            sht.Add(node);

            Assert.IsTrue(sht.Contains(node));
        }
예제 #6
0
        public void AddWithObjectTest()
        {
            var sht  = new SimpleHashtable();
            var node = new Node(1, "value for 1");

            sht.Add(node);
            Assert.IsTrue(sht.Count == 1);
            Assert.IsInstanceOfType(sht[0], typeof(Node));
        }
예제 #7
0
        public void GetEnumeratorTest()
        {
            var sht  = new SimpleHashtable();
            var node = new Node(1, "value for 1");

            sht.Add(node);
            var enumerator = sht.GetEnumerator();

            Assert.IsInstanceOfType(enumerator, typeof(IEnumerator <Node>));
        }
        public void CopyToTest()
        {
            var sht = new SimpleHashtable();
            var node = new Node(1, "value for 1");
            sht.Add(node);

            Node[] array = new Node[1];
            sht.CopyTo(array, 0);
            Assert.IsNotNull(array);
            Assert.IsInstanceOfType(array[0], typeof(Node));
        }
예제 #9
0
        public void CopyToTest()
        {
            var sht  = new SimpleHashtable();
            var node = new Node(1, "value for 1");

            sht.Add(node);

            Node[] array = new Node[1];
            sht.CopyTo(array, 0);
            Assert.IsNotNull(array);
            Assert.IsInstanceOfType(array[0], typeof(Node));
        }
 public void GetEnumeratorTest()
 {
     var sht = new SimpleHashtable();
     var node = new Node(1, "value for 1");
     sht.Add(node);
     var enumerator = sht.GetEnumerator();
     Assert.IsInstanceOfType(enumerator, typeof(IEnumerator<Node>));
 }