Пример #1
0
        public void TestGetHashCode()
        {
            DataColumn dc1;
            int        iHashCode1;

            dc1 = new DataColumn();

            iHashCode1 = dc1.GetHashCode();
            for (int i = 0; i < 10; i++)
            {   // must return the same value each time
                // GetHashCode #" + i.ToString());
                Assert.Equal(dc1.GetHashCode(), iHashCode1);
            }
        }
Пример #2
0
        //Activate This Construntor to log All To Standard output
        //public TestClass():base(true){}

        //Activate this constructor to log Failures to a log file
        //public TestClass(System.IO.TextWriter tw):base(tw, false){}


        //Activate this constructor to log All to a log file
        //public TestClass(System.IO.TextWriter tw):base(tw, true){}

        //BY DEFAULT LOGGING IS DONE TO THE STANDARD OUTPUT ONLY FOR FAILURES

        public void run()
        {
            Exception exp = null;

            DataColumn dc1;
            int        iHashCode1;

            dc1 = new DataColumn();

            iHashCode1 = dc1.GetHashCode();
            for (int i = 0; i < 10; i++)
            {           //must return the same value each time
                try
                {
                    BeginCase("GetHashCode #" + i.ToString());
                    Compare(iHashCode1, dc1.GetHashCode());
                }
                catch (Exception ex)     { exp = ex; }
                finally { EndCase(exp); exp = null; }
            }
        }
Пример #3
0
        public void TestGetHashCode()
        {
            DataColumn dc1;
            int iHashCode1;
            dc1 = new DataColumn();

            iHashCode1 = dc1.GetHashCode();
            for (int i = 0; i < 10; i++)
            {   // must return the same value each time
                // GetHashCode #" + i.ToString());
                Assert.Equal(dc1.GetHashCode(), iHashCode1);
            }
        }