Ejemplo n.º 1
0
 public GenerationState()
 {
     TestCases = new TestCasesManager();
     Template  = new TemplateManager();
     Settings  = new SettingsManager();
     List      = new TestListManager();
     Suite     = new TestSuiteManager();
 }
Ejemplo n.º 2
0
        public TestCasesPresenter(RenameVariableWindow renameVariablewindow, FilterWindow filterWindow, ConnectionStringWindow connectionStringWindow, TestCasesManager testCasesManager, DataTable testCases, BindingList <string> variables, BindingList <string> connectionStringNames)
        {
            this.OpenTestCasesCommand          = new OpenTestCasesCommand(this);
            this.OpenTestCasesQueryCommand     = new OpenTestCasesQueryCommand(this);
            this.RenameVariableCommand         = new RenameVariableCommand(this, renameVariablewindow);
            this.RemoveVariableCommand         = new RemoveVariableCommand(this);
            this.MoveLeftVariableCommand       = new MoveLeftVariableCommand(this);
            this.MoveRightVariableCommand      = new MoveRightVariableCommand(this);
            this.FilterCommand                 = new FilterCommand(this, filterWindow);
            this.AddConnectionStringCommand    = new AddConnectionStringCommand(this, connectionStringWindow);
            this.RemoveConnectionStringCommand = new RemoveConnectionStringCommand(this);
            this.EditConnectionStringCommand   = new EditConnectionStringCommand(this, connectionStringWindow);
            this.RunQueryCommand               = new RunQueryCommand(this);

            this.testCasesManager         = testCasesManager;
            TestCases                     = testCases;
            Variables                     = variables;
            ConnectionStringNames         = connectionStringNames;
            ConnectionStringSelectedIndex = -1;
            VariableSelectedIndex         = -1;
        }
Ejemplo n.º 3
0
        public void Filter_LikeEnd_CorrectNewContent()
        {
            var manager = new TestCasesManager();

            //Setup content;
            manager.Content.Columns.Add(new DataColumn("columnName"));
            manager.Variables.Add("columnName");
            var matchingRow = manager.Content.NewRow();

            matchingRow[0] = "matching";
            var nonMatchingRow = manager.Content.NewRow();

            nonMatchingRow[0] = "xyz";
            manager.Content.Rows.Add(matchingRow);
            manager.Content.Rows.Add(nonMatchingRow);
            manager.Content.AcceptChanges();

            //Setup filter
            manager.Filter("columnName", Operator.Like, false, "%ing");

            Assert.That(manager.Content.Rows, Has.Count.EqualTo(1));
            Assert.That(manager.Content.Rows[0][0], Is.EqualTo("matching"));
        }