Beispiel #1
0
        public void SimpleHashtableTest()
        {
            var sht = new SimpleHashtable();

            Assert.IsNotNull(sht);
            Assert.IsInstanceOfType(sht, typeof(SimpleHashtable));
        }
 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));
 }
Beispiel #5
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));
        }
Beispiel #6
0
        public void ContainsTest()
        {
            var sht  = new SimpleHashtable();
            var node = new Node(1, "value for 1");

            sht.Add(node);

            Assert.IsTrue(sht.Contains(node));
        }
Beispiel #7
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));
        }
Beispiel #8
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));
        }
Beispiel #10
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 SimpleHashtableTest()
 {
     var sht = new SimpleHashtable();
     Assert.IsNotNull(sht);
     Assert.IsInstanceOfType(sht, typeof(SimpleHashtable));
 }
 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>));
 }