@@ -6,24 +6,21 @@ namespace Testing.DataFresh
66{
77 [ TestFixture ]
88 public class DataFreshConsoleTester
9- {
10- readonly string userId ;
11- readonly string password ;
12- readonly string server ;
13-
14- public DataFreshConsoleTester ( )
15- {
16- var doc = new System . Xml . XmlDocument ( ) ;
17- doc . Load ( Path . Combine ( Path . GetDirectoryName ( GetType ( ) . Assembly . Location ) , @"..\..\..\TestConnectionStrings.xml" ) ) ;
18- //connectionString = connectionString =
19- // string.Format(doc.SelectSingleNode("/connectionStrings/sqlDataFreshSampleConnectionStringTemplate").InnerText,
20- userId = doc . SelectSingleNode ( "/connectionStrings/properties/userId" ) . InnerText ;
21- password = doc . SelectSingleNode ( "/connectionStrings/properties/password" ) . InnerText ;
22- server = doc . SelectSingleNode ( "/connectionStrings/properties/server" ) . InnerText ;
23- //doc.SelectSingleNode("/connectionStrings/properties/pooling").InnerText);
24- }
9+ {
10+ readonly string userId ;
11+ readonly string password ;
12+ readonly string server ;
2513
26- [ SetUp ]
14+ public DataFreshConsoleTester ( )
15+ {
16+ var doc = new System . Xml . XmlDocument ( ) ;
17+ doc . Load ( Path . Combine ( Path . GetDirectoryName ( GetType ( ) . Assembly . Location ) , @"..\..\..\TestConnectionStrings.xml" ) ) ;
18+ userId = doc . SelectSingleNode ( "/connectionStrings/properties/userId" ) . InnerText ;
19+ password = doc . SelectSingleNode ( "/connectionStrings/properties/password" ) . InnerText ;
20+ server = doc . SelectSingleNode ( "/connectionStrings/properties/server" ) . InnerText ;
21+ }
22+
23+ [ SetUp ]
2724 public void Setup ( )
2825 {
2926 ExecuteDataFreshConsole ( "PREPARE" ) ;
@@ -38,15 +35,15 @@ public void TearDown()
3835 [ Test ]
3936 public void NoArgs ( )
4037 {
41- string [ ] args = new string [ ] { } ;
38+ string [ ] args = new string [ ] { } ;
4239 DataFreshConsole console = new DataFreshConsole ( ) ;
4340 console . Start ( args ) ;
4441 }
4542
4643 [ Test ]
4744 public void BlankArgs ( )
4845 {
49- string [ ] args = new string [ ] { "" , "" } ;
46+ string [ ] args = new string [ ] { "" , "" } ;
5047 DataFreshConsole console = new DataFreshConsole ( ) ;
5148 console . Start ( args ) ;
5249 }
@@ -81,7 +78,7 @@ public void RefreshCommand()
8178 public void RefreshWithoutPrepareCommand ( )
8279 {
8380 ExecuteDataFreshConsole ( "REMOVE" ) ;
84- Assert . Throws < SqlDataFreshException > ( ( ) => ExecuteDataFreshConsole ( "REFRESH" ) ) ;
81+ Assert . Throws < SqlDataFreshException > ( ( ) => ExecuteDataFreshConsole ( "REFRESH" ) ) ;
8582 }
8683
8784 [ Test ]
@@ -111,13 +108,13 @@ public void PassServerNameCheckConnectionString()
111108 Assert . AreEqual ( serverInstance , console . arguments [ "s" ] ) ;
112109 string expectedConnectionString = @"user id=test;password=test;Initial Catalog=DataFreshSample;Data Source=localhost;" ;
113110 Assert . AreEqual ( expectedConnectionString , console . connectionString ) ;
114- }
115-
111+ }
112+
116113 [ Test ]
117114 public void CheckSnapshotPath ( )
118- {
119- //-sp "${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData""
120- //-sp '${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData'
115+ {
116+ //-sp "${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData""
117+ //-sp '${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData'
121118 string snapshotPath = @"c:\temp" ;
122119 DataFreshConsole console = DataFreshConsole . Execute ( "FOO" , "test" , "test" , "localhost" , "DataFreshSample" , "-sp" , snapshotPath ) ;
123120 Assert . AreEqual ( 6 , console . arguments . Keys . Count ) ;
0 commit comments