Exemple #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));
        }
Exemple #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");
		}
Exemple #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");
		}
Exemple #4
0
        public void TestContainsObjectKey()
        {
            JSObject o = new JSObject(null);

            o.AddObjectKey(1, 2);

            Assert.IsTrue(o.ContainsObjectKey(1));
        }
Exemple #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");
        }
Exemple #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");
        }
Exemple #7
0
        public void TestRemoveObjectKey()
        {
            JSObject o = new JSObject(null);

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

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

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

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

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

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

			Assert.AreEqual (0, o.Count);
		}
Exemple #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));
		}