Skip to content

Commit d7efe0d

Browse files
committed
[DEVLEAD-2984] Fix review feedback.
1 parent 4c18b51 commit d7efe0d

2 files changed

Lines changed: 23 additions & 26 deletions

File tree

TestConnectionStrings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<properties>
33
<userId>tf_user</userId>
44
<password>1234</password>
5-
<server>172.17.159.185</server>
5+
<server>localhost</server>
66
<pooling>false</pooling>
77
</properties>
88
<sqlMasterDatabaseConnectionStringTemplate>user id={0};password={1};Initial Catalog=master;Server={2};pooling={3};</sqlMasterDatabaseConnectionStringTemplate>

Testing.DataFresh/DataFreshConsoleTester.cs

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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 &quot;${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData&quot;"
120-
//-sp '${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData'
115+
{
116+
//-sp &quot;${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData&quot;"
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

Comments
 (0)