public void Execute_Schema_ListStructureContainingSixElements() { var conn = new SqlConnection(ConnectionStringReader.GetSqlClient()); var factory = new RelationalStructureDiscoveryFactory(conn); var cmd = factory.Instantiate(Target.Perspectives, TargetType.Object, new CaptionFilter[] { }); var structs = cmd.Execute(); Assert.That(structs.Count(), Is.EqualTo(6 + 2));//6 standards + Northwind + Olympics }
public void Execute_Table_ListStructureContainingFifteenElements() { var conn = new SqlConnection(ConnectionStringReader.GetSqlClient()); var factory = new RelationalStructureDiscoveryFactory(conn); var cmd = factory.Instantiate(Target.Tables, TargetType.Object, new CaptionFilter[] { new CaptionFilter(Target.Perspectives, "Sales"), }); var structs = cmd.Execute(); Assert.That(structs.Count(), Is.EqualTo(19 + 7));//Tables + Views }
public void Execute_Routines_ListStructureContainingThreeElements() { var conn = new SqlConnection(ConnectionStringReader.GetSqlClient()); var factory = new RelationalStructureDiscoveryFactory(conn); var cmd = factory.Instantiate(Target.Routines, TargetType.Object, new CaptionFilter[] { new CaptionFilter(Target.Perspectives,"HumanResources") }); var structs = cmd.Execute(); Assert.That(structs.Count(), Is.EqualTo(3)); }
public void Execute_RoutinesWithName_ListStructureContainingThisRoutine() { var conn = new SqlConnection(ConnectionStringReader.GetSqlClient()); var factory = new RelationalStructureDiscoveryFactory(conn); var cmd = factory.Instantiate(Target.Routines, TargetType.Object, new CaptionFilter[] { new CaptionFilter(Target.Perspectives,"dbo") , new CaptionFilter(Target.Routines,"ufnGetContactInformation") }); var structs = cmd.Execute(); Assert.That(structs.Count(), Is.EqualTo(1)); }