Exemplo n.º 1
0
        public void AddCertTest()
        {
            //Arrange
            string testName = "testName";
            wizard = new OverRiddenWizard_2();

            //Act
            wizard.AddCertificate(testName);
            List<string> output = wizard.CertList;

            //Assert
            Assert.IsTrue(output[0] == testName);
        }
Exemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            GWydiRWizardUI ui = new GWydiRWizardUI();
            Wizard wizard = new Wizard(); // need to add an object to congiure the wizard from subscritions/config files
            AuthorisationModel authModel = new AuthorisationModel(ui, wizard);
            ConfigurationModel confModel = new ConfigurationModel(ui, wizard);
            ProductionModel prodModel = new ProductionModel(ui, wizard);

            Application.Run(ui);
        }
Exemplo n.º 3
0
        public void AddMultipleCertsAddNoDuplicatesTest()
        {
            //Arrange
            string testName = "testName";
            wizard = new OverRiddenWizard_2();

            //Act
            wizard.AddCertificate(testName);
            wizard.AddCertificate(testName);
            List<string> output = wizard.CertList;

            //Assert
            Assert.IsTrue(output.Count == 1);
        }
Exemplo n.º 4
0
 public void setUp()
 {
     wizard = new OverRiddenWizard_1();
     // mockWriter.Stub(x => x.Create(Arg<string>.Is.Anything));
     testSID = "1ab23c-23de-d3d2-4f2f-2f2c2d1a4f3d";
 }
Exemplo n.º 5
0
        public void SaveSubscriptionsTest()
        {
            //Arrange
            FileWriter mockWriter = MockRepository.GenerateMock<FileWriter>();
            mockWriter.Expect(x => x.Write(Arg<string>.Is.Anything, Arg<List<string>>.Is.Anything));

            wizard = new OverRiddenWizard_2(mockWriter);

            //Act
            wizard.SaveSubscriptions();

            //Assert
            mockWriter.VerifyAllExpectations();
        }
Exemplo n.º 6
0
        public void HasCertTest()
        {
            //Arrange
            string testName1 = "testname1";
            wizard = new OverRiddenWizard_2();

            //Act
            bool pass = wizard.HasCert(testName1);

            //Assert
            Assert.IsFalse(pass);
        }