public static void MyClassInitialize(TestContext testContext) { //ConnectionString = @"Data Source=localhost\tab17;"; //ConnectionString = @"Data Source=.\sql2014tb"; keywordDataSet = new DataSet(); keywordDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Keyword> { new Keyword { KEYWORD = "TABLE" }, new Keyword { KEYWORD = "EVALUATE" } }) ); functionDataSet = new DataSet(); functionDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Function> { new Function { FUNCTION_NAME = "FILTER", ORIGIN = 4 }, new Function { FUNCTION_NAME = "CALCULATE", ORIGIN = 3 } }) ); measureDataSet = new DataSet(); measureDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Measure> { new Measure { MEASURE_NAME = "MyMeasure", MEASURE_CAPTION = "MyMeasure", DESCRIPTION = "My Description", EXPRESSION = "1" } }) ); measureDataSetEmpty = new DataSet(); measureDataSetEmpty.Tables.Add(DmvHelpers.ListToTable(new List <Measure>())); cubesDataSet = new DataSet(); cubesDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Cube> { new Cube { CUBE_NAME = "Adventure Works", CUBE_CAPTION = "Adventure Works", BASE_CUBE_NAME = "", DESCRIPTION = "Mock Cube" } }) ); }
public static void MyClassInitialize(TestContext testContext) { mockOptions = new Mock <IGlobalOptions>().Object; //ConnectionString = @"Data Source=localhost\tab17;"; //ConnectionString = @"Data Source=.\sql2014tb"; keywordDataSet = new DataSet(); keywordDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Keyword> { new Keyword { KEYWORD = "TABLE" }, new Keyword { KEYWORD = "EVALUATE" } }) ); functionDataSet = new DataSet(); functionDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Function> { new Function { FUNCTION_NAME = "FILTER", ORIGIN = 4 }, new Function { FUNCTION_NAME = "CALCULATE", ORIGIN = 3 } }) ); measureDataSet = new DataSet(); measureDataSet.Tables.Add( DmvHelpers.ListToTable(new List <MeasureMD> { new MeasureMD { MEASURE_NAME = "MyMeasure", MEASURE_CAPTION = "MyMeasure", DESCRIPTION = "My Description", EXPRESSION = "1" } }) ); measureDataSetEmpty = new DataSet(); measureDataSetEmpty.Tables.Add(DmvHelpers.ListToTable(new List <MeasureMD>())); cubesDataSet = new DataSet(); cubesDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Cube> { new Cube { CUBE_NAME = "Adventure Works", CUBE_CAPTION = "Adventure Works", BASE_CUBE_NAME = "", DESCRIPTION = "Mock Cube" } }) ); var csdl = string.Join("\n", File.ReadAllLines(@"..\..\data\FoldersCSDL.xml")); csdlMetaDataRowset = new DataSet(); csdlMetaDataRowset.Tables.Add( DmvHelpers.ListToTable(new List <CSDL_METADATA> { new CSDL_METADATA { Metadata = csdl } }) ); emptyDataSet = new DataSet(); emptyDataSet.Tables.Add(new DataTable()); }
public static void MyClassInitialize(TestContext testContext) { //ConnectionString = @"Data Source=localhost\tab17;"; //ConnectionString = @"Data Source=.\sql2014tb"; keywordDataSet = new DataSet(); keywordDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Keyword> { new Keyword { KEYWORD = "TABLE" }, new Keyword { KEYWORD = "EVALUATE" } }) ); functionDataSet = new DataSet(); functionDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Function> { new Function { FUNCTION_NAME = "FILTER", ORIGIN = 4 }, new Function { FUNCTION_NAME = "CALCULATE", ORIGIN = 3 } }) ); dmvDataSet = new DataSet(); dmvDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Dmv> { new Dmv { SchemaName = "TMSCHEMA_MEASURES" }, }) ); measureDataSet_MD = new DataSet(); measureDataSet_MD.Tables.Add( DmvHelpers.ListToTable(new List <MeasureMD> { new MeasureMD { MEASURE_NAME = "MyMeasure", MEASURE_CAPTION = "MyMeasure", DESCRIPTION = "My Description", EXPRESSION = "1" } }) ); measureDataSet_TM = new DataSet(); measureDataSet_TM.Tables.Add( DmvHelpers.ListToTable(new List <MeasureTM> { new MeasureTM { TableID = 1, Name = "MyMeasure", Description = "My Description", Expression = "1" } }) ); tablesDataSet = new DataSet(); tablesDataSet.Tables.Add( DmvHelpers.ListToTable(new List <TableTM> { new TableTM { ID = 1, Name = "Reseller Sales" } }) ); measureDataSetEmpty = new DataSet(); measureDataSetEmpty.Tables.Add(DmvHelpers.ListToTable(new List <MeasureMD>())); cubesDataSet = new DataSet(); cubesDataSet.Tables.Add( DmvHelpers.ListToTable(new List <Cube> { new Cube { CUBE_NAME = "Adventure Works", CUBE_CAPTION = "Adventure Works", BASE_CUBE_NAME = "", DESCRIPTION = "Mock Cube" } }) ); }