Esempio n. 1
0
        public void ProvideValueInconsistent3()
        {
            var x = new ArrayExtension(new int [] { 1, 3 });

            x.AddText("test");
            Assert.Throws <InvalidOperationException> (() => x.ProvideValue(null));
        }
Esempio n. 2
0
        public void ProvideValueInconsistent3()
        {
            var x = new ArrayExtension(new int [] { 1, 3 });

            x.AddText("test");
            x.ProvideValue(null);
        }
Esempio n. 3
0
        public void ProvideValueInconsistent()
        {
            var x = new ArrayExtension(typeof(int));

            x.AddChild(new object());
            x.ProvideValue(null);
        }
Esempio n. 4
0
        public void ProvideValueInconsistent()
        {
            var x = new ArrayExtension(typeof(int));

            x.AddChild(new object());
            Assert.Throws <InvalidOperationException> (() => x.ProvideValue(null));
        }
Esempio n. 5
0
 public void ProvideValueWithoutType()
 {
     Assert.Throws(typeof(InvalidOperationException), () =>
     {
         var x = new ArrayExtension();
         x.ProvideValue(null);                 // Type must be set first.
     });
 }
Esempio n. 6
0
        public void ProvideValueInconsistent2()
        {
            var x = new ArrayExtension(new int [] { 1, 3 });

            x.AddChild(new object());
            x.AddChild(null);              // allowed
            Assert.AreEqual(4, x.Items.Count);
            Assert.Throws <InvalidOperationException> (() => x.ProvideValue(null));
        }
Esempio n. 7
0
        public void ProvideValueInconsistent2()
        {
            var x = new ArrayExtension(new int [] { 1, 3 });

            x.AddChild(new object());
            x.AddChild(null);              // allowed
            Assert.AreEqual(4, x.Items.Count);
            x.ProvideValue(null);
        }
Esempio n. 8
0
 public void ProvideValueInconsistent3()
 {
     Assert.Throws(typeof(InvalidOperationException), () =>
     {
         var x = new ArrayExtension(new int[] { 1, 3 });
         x.AddText("test");
         x.ProvideValue(null);
     });
 }
Esempio n. 9
0
        public void ArrayExtensionProvideValue()
        {
            tlog.Debug(tag, $"ArrayExtensionProvideValue START");

            try
            {
                IServiceProviderImpl serviceProviderimplement = new IServiceProviderImpl();
                Assert.IsNotNull(serviceProviderimplement, "null IServiceProviderimplement");
                Assert.IsInstanceOf <IServiceProviderImpl>(serviceProviderimplement, "Should return IServiceProviderImpl instance.");
                array.Items.Add("string");
                array.Type = typeof(string);

                array.ProvideValue(serviceProviderimplement);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"ArrayExtensionProvideValue END");
        }
Esempio n. 10
0
        public void ProvideValue()
        {
            var x = new ArrayExtension(new int [] { 1, 3 });

            x.AddChild(5);
            Assert.AreEqual(3, x.Items.Count);
            var ret = x.ProvideValue(null);

            Assert.IsNotNull(ret, "#1");
            var arr = ret as int [];

            Assert.IsNotNull(arr, "#2");
            Assert.AreEqual(3, arr.Length, "#3");
            Assert.AreEqual(5, arr [2], "#4");
        }
Esempio n. 11
0
        public void ArrayExtensionProvideValue()
        {
            tlog.Debug(tag, $"ArrayExtensionProvideValue START");

            try
            {
                IServiceProviderimplement serviceProviderimplement = new IServiceProviderimplement();
                a1.Type = typeof(string);

                a1.ProvideValue(serviceProviderimplement);
            }
            catch (Exception e)
            {
                Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

            tlog.Debug(tag, $"ArrayExtensionProvideValue END (OK)");
            Assert.Pass("ArrayExtensionProvideValue");
        }
		public void ProvideValueWithoutType ()
		{
			var x = new ArrayExtension ();
			x.ProvideValue (null); // Type must be set first.
		}
Esempio n. 13
0
		public void ProvideValueEmpty ()
		{
			var x = new ArrayExtension (typeof (int));
			x.ProvideValue (null); // allowed.
		}
		public void ProvideValueInconsistent3 ()
		{
			var x = new ArrayExtension (new int [] {1, 3});
			x.AddText ("test");
			x.ProvideValue (null);
		}
		public void ProvideValueInconsistent2 ()
		{
			var x = new ArrayExtension (new int [] {1, 3});
			x.AddChild (new object ());
			x.AddChild (null); // allowed
			Assert.AreEqual (4, x.Items.Count);
			x.ProvideValue (null);
		}
Esempio n. 16
0
        public void ProvideValueEmpty()
        {
            var x = new ArrayExtension(typeof(int));

            x.ProvideValue(null);              // allowed.
        }
		public void ProvideValueInconsistent ()
		{
			var x = new ArrayExtension (typeof (int));
			x.AddChild (new object ());
			x.ProvideValue (null);
		}
Esempio n. 18
0
		public void ProvideValueInconsistent ()
		{
			var x = new ArrayExtension (typeof (int));
			x.AddChild (new object ());
			Assert.Throws<InvalidOperationException> (() => x.ProvideValue (null));
		}
Esempio n. 19
0
        public void ProvideValueWithoutType()
        {
            var x = new ArrayExtension();

            x.ProvideValue(null);              // Type must be set first.
        }
Esempio n. 20
0
		public void ProvideValueInconsistent3 ()
		{
			var x = new ArrayExtension (new int [] {1, 3});
			x.AddText ("test");
			Assert.Throws<InvalidOperationException> (() => x.ProvideValue (null));
		}
Esempio n. 21
0
		public void ProvideValue ()
		{
			var x = new ArrayExtension (new int [] {1, 3});
			x.AddChild (5);
			Assert.AreEqual (3, x.Items.Count);
			var ret = x.ProvideValue (null);
			Assert.IsNotNull (ret, "#1");
			var arr = ret as int [];
			Assert.IsNotNull (arr, "#2");
			Assert.AreEqual (3, arr.Length, "#3");
			Assert.AreEqual (5, arr [2], "#4");
		}
Esempio n. 22
0
		public void ProvideValueInconsistent2 ()
		{
			var x = new ArrayExtension (new int [] {1, 3});
			x.AddChild (new object ());
			x.AddChild (null); // allowed
			Assert.AreEqual (4, x.Items.Count);
			Assert.Throws<InvalidOperationException> (() => x.ProvideValue (null));
		}
Esempio n. 23
0
        public void ProvideValueWithoutType()
        {
            var x = new ArrayExtension();

            Assert.Throws <InvalidOperationException> (() => x.ProvideValue(null));             // Type must be set first.
        }
Esempio n. 24
0
		public void ProvideValueWithoutType ()
		{
			var x = new ArrayExtension ();
			Assert.Throws<InvalidOperationException> (() => x.ProvideValue (null)); // Type must be set first.
		}