Esempio n. 1
0
 public void TestGetDistinctConstraintNames()
 {
     var testData = new NoFuture.Hbm.DbQryContainers.SortedKeys();
     var testOutput = new List<ColumnMetadata>();
     var testResult = testData.GetKeyManyToOneColumns("dbo.TableWithCompositePk", ref testOutput);
     Assert.IsTrue(testResult);
 }
Esempio n. 2
0
 public void TestConstraintNameComparer()
 {
     var testData = new NoFuture.Hbm.DbQryContainers.SortedKeys();
     var testOutput = new List<ColumnMetadata>();
     var testInput = testData.GetKeyManyToOneColumns("dbo.TableWithCompositePk", ref testOutput);
     foreach(var cd in testOutput)
         System.Diagnostics.Debug.WriteLine(cd.constraint_name);
     var testResult = testOutput.Distinct(new ConstraintNameComparer()).ToList();
     Assert.AreEqual(1,testResult.Count);
 }