Exemplo n.º 1
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;}
		}
	}
Exemplo n.º 2
0
 // must override GetHashCode if Equals is redefined
 public override int GetHashCode()
 {
     return(Column.GetHashCode() ^ IsDescending.GetHashCode());
 }
Exemplo n.º 3
0
		[Test] 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.AreEqual(dc1.GetHashCode(), iHashCode1 , "DC27");
			}
		}
Exemplo n.º 4
0
 // must override GetHashCode if Equals is redefined
 public override int GetHashCode() =>
 Column.GetHashCode() ^ IsDescending.GetHashCode();