public void TestFlattenTypeGetGraphVizMrecords() { var testAsm = AppDomain.CurrentDomain.GetAssemblies() .FirstOrDefault(x => x.GetName().FullName.StartsWith("AdventureWorks")); if (testAsm == null) { Assembly.Load( System.IO.File.ReadAllBytes(@"C:\Projects\31g\trunk\bin\NoFuture.Hbm.Sid.dll")); testAsm = Assembly.Load( System.IO.File.ReadAllBytes( @"C:\Projects\31g\trunk\Code\NoFuture.Tests\ExampleDlls\AdventureWorks.dll")); } Assert.IsNotNull(testAsm); var testGia = new NoFuture.Util.Gia.Args.FlattenTypeArgs() { Assembly = testAsm, UseTypeNames = false, Separator = "-", TypeFullName = "AdventureWorks.Person.Person", Depth = 16 }; var flattenedType = NoFuture.Util.Gia.Flatten.FlattenType(testGia); var testResult = flattenedType.GetGraphVizMrecords; Assert.IsNotNull(testResult); Assert.AreNotEqual(0, testResult.Count); foreach(var fj in testResult) System.Diagnostics.Debug.WriteLine(fj.ToGraphVizString()); }
public void TestFlattenTypeMembers() { var testAsm = AppDomain.CurrentDomain.GetAssemblies() .FirstOrDefault(x => x.GetName().FullName.StartsWith("AdventureWorks")); if (testAsm == null) { Assembly.Load( System.IO.File.ReadAllBytes(@"C:\Projects\31g\trunk\bin\NoFuture.Hbm.Sid.dll")); testAsm = Assembly.Load( System.IO.File.ReadAllBytes( @"C:\Projects\31g\trunk\Code\NoFuture.Tests\ExampleDlls\AdventureWorks.dll")); } Assert.IsNotNull(testAsm); var testGia = new NoFuture.Util.Gia.Args.FlattenTypeArgs() { Assembly = testAsm, UseTypeNames = false, Separator = "-", TypeFullName = "AdventureWorks.Person.Person", Depth = 16 }; var testPrint = NoFuture.Util.Gia.Flatten.FlattenType(testGia); Assert.IsNotNull(testPrint); var printLines = testPrint.PrintLines(); Assert.IsNotNull(printLines); System.IO.File.WriteAllLines(@"C:\Projects\31g\trunk\temp\FlattenedExample.txt", printLines); foreach (var p in printLines) System.Diagnostics.Debug.WriteLine(p); }
public void TestFlattentypeToGraphVizString() { var testAsm = AppDomain.CurrentDomain.GetAssemblies() .FirstOrDefault(x => x.GetName().FullName.StartsWith("AdventureWorks")); if (testAsm == null) { Assembly.Load( System.IO.File.ReadAllBytes(@"C:\Projects\31g\trunk\bin\NoFuture.Hbm.Sid.dll")); testAsm = Assembly.Load( System.IO.File.ReadAllBytes( @"C:\Projects\31g\trunk\Code\NoFuture.Tests\ExampleDlls\AdventureWorks.dll")); } Assert.IsNotNull(testAsm); var testGia = new NoFuture.Util.Gia.Args.FlattenTypeArgs() { Assembly = testAsm, UseTypeNames = false, Separator = "-", TypeFullName = "AdventureWorks.Person.Person", Depth = 16 }; var flattenedType = NoFuture.Util.Gia.Flatten.FlattenType(testGia); var testResult = flattenedType.ToGraphVizString(); Assert.IsFalse(string.IsNullOrWhiteSpace(testResult)); System.IO.File.WriteAllText(@"C:\Projects\31g\trunk\temp\TestGraphVizFlatType.gv", testResult); }