Ejemplo n.º 1
0
        public void Repeater_DefaultsSelectArguments()
        {
            Poker p = new Poker();
            DataSourceSelectArguments args, args2;

            args  = p.GetSelectArguments();
            args2 = p.DoCreateDataSourceSelectArguments();

            Assert.AreEqual(args, args2, "call == prop");

            Assert.IsNotNull(args, "property null check");
            Assert.IsTrue(args != DataSourceSelectArguments.Empty, "property != Empty check");
            Assert.IsTrue(args.Equals(DataSourceSelectArguments.Empty), "property but they are empty check");

            Assert.IsNotNull(args2, "method null check");
            Assert.IsTrue(args2 != DataSourceSelectArguments.Empty, "method != Empty check");
            Assert.IsTrue(args2.Equals(DataSourceSelectArguments.Empty), "method but they are empty check");

            /* check to see whether multiple calls give us different refs */
            args = p.DoCreateDataSourceSelectArguments();

            Assert.AreEqual(args, args2, "multiple calls, same ref");
            Assert.AreEqual(string.Empty, p.DataSourceID, "DataSourceID");
            Assert.AreEqual(false, p.RequiresDataBinding, "RequiresDataBinding");
        }
Ejemplo n.º 2
0
		public void Repeater_DefaultsSelectArguments ()
		{
			Poker p = new Poker ();
			DataSourceSelectArguments args, args2;

			args = p.GetSelectArguments();
			args2 = p.DoCreateDataSourceSelectArguments();

			Assert.AreEqual (args, args2, "call == prop");

			Assert.IsNotNull (args, "property null check");
			Assert.IsTrue    (args != DataSourceSelectArguments.Empty, "property != Empty check");
			Assert.IsTrue    (args.Equals (DataSourceSelectArguments.Empty), "property but they are empty check");

			Assert.IsNotNull (args2, "method null check");
			Assert.IsTrue    (args2 != DataSourceSelectArguments.Empty, "method != Empty check");
			Assert.IsTrue    (args2.Equals (DataSourceSelectArguments.Empty), "method but they are empty check");

			/* check to see whether multiple calls give us different refs */
			args = p.DoCreateDataSourceSelectArguments();
			
			Assert.AreEqual (args, args2, "multiple calls, same ref");
			Assert.AreEqual (string.Empty, p.DataSourceID, "DataSourceID");
			Assert.AreEqual (false, p.RequiresDataBinding, "RequiresDataBinding");
		}