Beispiel #1
0
        // Not implemented in .NET
        public void TestContainsValue()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(1, 2);
            o.AddObjectKey(2, 3);
            o.AddObjectKey(1, 3);

            Assert.IsTrue(o.ContainsValue(3));
        }
Beispiel #2
0
		public void TestAsObjectKeyedDictionary ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey ("1", 2);
			o.AddObjectKey ("2", 4);
			o.AddObjectKey ("3", 4);
			o.AddObjectKey (3, 5);
			o.AddObjectKey ("a", 6);

			IDictionary<object, object> dict = o.AsObjectKeyedDictionary ();

			Assert.AreEqual (2, dict ["1"], "B1");
			Assert.AreEqual (4, dict ["2"], "B2");
			Assert.AreEqual (5, dict ["3"], "B3");
			Assert.AreEqual (6, dict ["a"], "B4");
		}
Beispiel #3
0
		public void TestAddObjectKey ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey (0, 1);

			Assert.AreEqual (1, o.Count, "A1");
			Assert.IsTrue (o.ContainsObjectKey (0), "A2");
		}
Beispiel #4
0
        public void TestContainsObjectKey()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(1, 2);

            Assert.IsTrue(o.ContainsObjectKey(1));
        }
Beispiel #5
0
        public void TestAsObjectKeyedDictionary()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey("1", 2);
            o.AddObjectKey("2", 4);
            o.AddObjectKey("3", 4);
            o.AddObjectKey(3, 5);
            o.AddObjectKey("a", 6);

            IDictionary <object, object> dict = o.AsObjectKeyedDictionary();

            Assert.AreEqual(2, dict ["1"], "B1");
            Assert.AreEqual(4, dict ["2"], "B2");
            Assert.AreEqual(5, dict ["3"], "B3");
            Assert.AreEqual(6, dict ["a"], "B4");
        }
Beispiel #6
0
        public void TestAddObjectKey()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(0, 1);

            Assert.AreEqual(1, o.Count, "A1");
            Assert.IsTrue(o.ContainsObjectKey(0), "A2");
        }
Beispiel #7
0
        public void TestRemoveObjectKey()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(1, 2);
            o.RemoveObjectKey(1);

            Assert.AreEqual(0, o.Count);
        }
Beispiel #8
0
        public void TestDeleteItem()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(1, 2);
            o.DeleteItem(1);

            Assert.AreEqual(0, o.Count);
        }
Beispiel #9
0
		public void TestContainsObjectKey ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey (1, 2);

			Assert.IsTrue (o.ContainsObjectKey (1));
		}
Beispiel #10
0
		public void TestRemoveObjectKey ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey (1, 2);
			o.RemoveObjectKey (1);

			Assert.AreEqual (0, o.Count);
		}
Beispiel #11
0
		public void TestDeleteItem ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey (1, 2);
			o.DeleteItem (1);

			Assert.AreEqual (0, o.Count);
		}
Beispiel #12
0
		// Not implemented in .NET
		public void TestContainsValue ()
		{
			JSObject o = new JSObject (null);
			o.AddObjectKey (1, 2);
			o.AddObjectKey (2, 3);
			o.AddObjectKey (1, 3);

			Assert.IsTrue (o.ContainsValue (3));
		}