Exemplo n.º 1
0
        public void BlankArgs()
        {
            string[]         args    = new string[] { "", "" };
            DataFreshConsole console = new DataFreshConsole();

            console.Start(args);
        }
Exemplo n.º 2
0
        public void NoArgs()
        {
            string[]         args    = new string[] {};
            DataFreshConsole console = new DataFreshConsole();

            console.Start(args);
        }
Exemplo n.º 3
0
        public void CheckSnapshotPath()
        {
            //-sp "${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData""
            //-sp '${CCNetWorkingDirectory}\Web Harmony Solution\Database\Baseline\BaselineData'
            string           snapshotPath = @"c:\temp";
            DataFreshConsole console      = DataFreshConsole.Execute("FOO", "test", "test", "localhost", "DataFreshSample", "-sp", snapshotPath);

            Assert.AreEqual(6, console.arguments.Keys.Count);
            Assert.AreEqual(snapshotPath, console.arguments["sp"]);
        }
Exemplo n.º 4
0
        public void PassServerNameCheckConnectionString()
        {
            string           serverInstance = @"localhost";
            DataFreshConsole console        = DataFreshConsole.Execute("FOO", "test", "test", serverInstance, "DataFreshSample");

            Assert.AreEqual(5, console.arguments.Keys.Count);
            Assert.AreEqual(serverInstance, console.arguments["s"]);
            string expectedConnectionString = @"user id=test;password=test;Initial Catalog=DataFreshSample;Data Source=localhost;";

            Assert.AreEqual(expectedConnectionString, console.connectionString);
        }
Exemplo n.º 5
0
        public static void Main(string[] args)
        {
            DataFreshConsole console = new DataFreshConsole();

            console.Start(args);
        }
Exemplo n.º 6
0
        public void CheckResults()
        {
            DataFreshConsole console = ExecuteDataFreshConsole("REFRESH");

            Assert.IsTrue(console.Results.ToString().IndexOf("Entropy Zero") > -1);
        }
Exemplo n.º 7
0
 public void PrepareCommandIgnoreSnapshot()
 {
     DataFreshConsole console = ExecuteDataFreshConsole("PREPARE", "-ignoresnapshot", "1");
 }
Exemplo n.º 8
0
 public void PrepareCommand()
 {
     DataFreshConsole console = ExecuteDataFreshConsole("PREPARE");
 }
Exemplo n.º 9
0
        public void BadCommand()
        {
            DataFreshConsole console = ExecuteDataFreshConsole("BADCOMMAND");

            Assert.IsTrue(console.Results.ToString().IndexOf("Command 'BADCOMMAND' was not recognized") > -1);
        }
Exemplo n.º 10
0
        private static DataFreshConsole ExecuteDataFreshConsole(string command, params string[] options)
        {
            DataFreshConsole console = DataFreshConsole.Execute(command, "test", "test", "localhost", "DataFreshSample", options);

            return(console);
        }