public AddUnitTestDialog(MonoDevelop.Ide.Gui.Document document, MethodDeclarationSyntax currentMethod, GeneratedTest generatedTestModel)
        {
            _testGeneratorService = CompositionManager.Instance.GetExportedValue <ITestGeneratorService>();
            _currentMethod        = currentMethod;
            _document             = document;
            _generatedTestModel   = generatedTestModel;
            WindowPosition        = WindowPosition.CenterAlways;
            Title = "Add Unit test method";

            //entry setup
            _unitTestNameTitle = new Label
            {
                Text = "Unit test name:"
            };

            _unitTestName            = new Entry();
            _unitTestName.Activated += EntryActivated;

            //button setup
            _confirm = new Button
            {
                Label = "Create"
            };
            _confirm.Clicked += Confirm_Clicked;

            VBox.Add(_unitTestNameTitle);
            VBox.Add(_unitTestName);
            VBox.Add(_confirm);

            VBox.ShowAll();
        }
Example #2
0
        public void SetUp()
        {
            _connectionString = "Data Source=ky1-vrt-msqld1.ky.cafepress.com;" +
                                "Initial Catalog=transit;User ID=cpdba;Password=ithinkgreen";
            _dbSysUtilsMock = new Mock <IDbSysUtils>(MockBehavior.Strict);

            _target = new RepoTestGenerator(_connectionString, _dbSysUtilsMock.Object);

            _testProperties = new List <ModelProperty>
            {
                new ModelProperty
                {
                    PropertyDataType = "int",
                    PropertyName     = "RATE_GROUP_CODE",
                    IsNullable       = false
                },
                new ModelProperty
                {
                    PropertyDataType = "int",
                    PropertyName     = "SERVICE_LEVEL_NO",
                    IsNullable       = false
                },
                new ModelProperty
                {
                    PropertyDataType = "string",
                    PropertyName     = "RATE_GROUP_DESCRIPTION",
                    IsNullable       = false
                },
                new ModelProperty
                {
                    PropertyDataType = "string",
                    PropertyName     = "USER_ID",
                    IsNullable       = false
                },
                new ModelProperty
                {
                    PropertyDataType = "DateTimeOffset",
                    PropertyName     = "RECORD_INSERT_TIMESTAMP",
                    IsNullable       = false
                }
            };

            _testTables = new List <string>(
                new[]
            {
                "RATE_GROUP_DEF"
            }
                );
        }
Example #3
0
 public GenerateUnitTestCommand()
 {
     _testGeneratorService = CompositionManager.Instance.GetExportedValue <ITestGeneratorService>();
     _configurationService = CompositionManager.Instance.GetExportedValue <IConfigurationService>();
 }