Esempio n. 1
0
        [SetUp] public void setup()
        {
            qaConfigLoader = new TM_QA_Config_Loader();
            qaConfig       = new TM_QA_Config_Loader().load();

            Assert.IsNotNull(qaConfigLoader);
            Assert.IsNotNull(qaConfig);
            Assert.IsFalse(TM_QA_Config.Force_Server_Offline);
        }
Esempio n. 2
0
 public static TM_QA_Config                  save_QAConfig(this TM_QA_Config qaConfig)
 {
     if (qaConfig.notNull())
     {
         var localFilePath = new TM_QA_Config_Loader().localFilePath();
         qaConfig.saveAs(localFilePath);
     }
     return(qaConfig);
 }
Esempio n. 3
0
        public static TM_QA_Config                  load(this TM_QA_Config_Loader configLoader)
        {
            var localFilePath = configLoader.localFilePath();

            if (localFilePath.fileExists())
            {
                return(localFilePath.load <TM_QA_Config>());
            }
            return(configLoader.create());
        }
Esempio n. 4
0
        public void testFixtureSetUp()
        {
            TmQAConfig = new TM_QA_Config_Loader().load();
            if (TmQAConfig.serverOffline())
                Assert.Fail("[TestFixture_WebServices]TM server is offline: {0}".info(WebSite_Url));

            tbot = new IE_UnitTest
                {
                    TargetServer = TmQAConfig.Url_Target_TM_Site
                };
            ie = tbot.ie;
        }
Esempio n. 5
0
        [TestFixtureSetUp] public void testFixtureSetUp()
        {
            TmQAConfig = new TM_QA_Config_Loader().load();
            if (TmQAConfig.serverOffline())
            {
                Assert.Fail("[TestFixture_WebServices]TM server is offline: {0}".info(WebSite_Url));
            }

            tbot = new IE_UnitTest
            {
                TargetServer = TmQAConfig.Url_Target_TM_Site
            };
            ie = tbot.ie;
        }
Esempio n. 6
0
        public TestFixture_TBot()
        {
            Assert.Ignore("Disable IE tests");
            TmQAConfig = new TM_QA_Config_Loader().load();
            if (TmQAConfig.serverOffline())
            {
                Assert.Ignore("[TestFixture_WebServices]TM server is offline: {0}".info(WebSite_Url));
            }

            tbot = new API_IE_TBot
            {
                TargetServer = TmQAConfig.Url_Target_TM_Site
            };
            ie = tbot.ie;
        }
Esempio n. 7
0
        [Test] public void load_create()
        {
            var tmpFolder = "TM_QA_Config".tempDir(false);
            var tmpFile   = 10.randomLetters().append(".txt");

            qaConfigLoader = new TM_QA_Config_Loader(tmpFolder, tmpFile);

            Assert.IsFalse(qaConfigLoader.localFilePath().fileExists());

            qaConfig = qaConfigLoader.create();

            //check values
            Assert.NotNull(qaConfig);
            Assert.IsTrue(qaConfig.Firebase_Site.valid());
            Assert.IsTrue(qaConfig.Firebase_Area.valid());
            Assert.IsTrue(qaConfig.SMTP_Server.valid());
            Assert.IsTrue(qaConfig.SMTP_UserName.valid());
            Assert.IsTrue(qaConfig.Default_Admin_Email.valid());
            Assert.IsTrue(qaConfig.Default_Admin_User.valid());
            Assert.IsTrue(qaConfig.Default_Admin_Pwd.valid());
            Assert.AreEqual(qaConfig.Firebase_AuthToken, "");
            Assert.AreEqual(qaConfig.SMTP_Password, "");
            Assert.NotNull(qaConfig.TestUsers);
            Assert.AreEqual(qaConfig.TestUsers.size(), 3);

            // check that is exists and it is also created using .load()
            var localFilePath = qaConfigLoader.localFilePath();

            Assert.IsTrue(localFilePath.fileExists());
            localFilePath.file_Delete();
            Assert.IsFalse(localFilePath.fileExists());
            Assert.IsNotNull(qaConfigLoader.load());
            Assert.IsTrue(localFilePath.fileExists());

            //delete temp folder
            Assert.IsTrue(tmpFolder.dirExists());
            Assert.IsTrue(Files.deleteFolder(tmpFolder, true));
            Assert.IsFalse(tmpFolder.dirExists());
        }
Esempio n. 8
0
        public void load_create()
        {
            var tmpFolder = "TM_QA_Config".tempDir(false);
            var tmpFile = 10.randomLetters().append(".txt");

            qaConfigLoader = new TM_QA_Config_Loader(tmpFolder, tmpFile);

            Assert.IsFalse(qaConfigLoader.localFilePath().fileExists());

            qaConfig = qaConfigLoader.create();

            //check values
            Assert.NotNull (qaConfig                             );
            Assert.IsTrue  (qaConfig.Firebase_Site       .valid());
            Assert.IsTrue  (qaConfig.Firebase_Area       .valid());
            Assert.IsTrue  (qaConfig.SMTP_Server         .valid());
            Assert.IsTrue  (qaConfig.SMTP_UserName       .valid());
            Assert.IsTrue  (qaConfig.Default_Admin_Email .valid());
            Assert.IsTrue  (qaConfig.Default_Admin_User  .valid());
            Assert.IsTrue  (qaConfig.Default_Admin_Pwd   .valid());
            Assert.AreEqual(qaConfig.Firebase_AuthToken  , ""    );
            Assert.AreEqual(qaConfig.SMTP_Password       , ""    );
            Assert.NotNull (qaConfig.TestUsers                   );
            Assert.AreEqual(qaConfig.TestUsers.size()    , 3     );

            // check that is exists and it is also created using .load()
            var localFilePath = qaConfigLoader.localFilePath();
            Assert.IsTrue   (localFilePath.fileExists());
            localFilePath.file_Delete();
            Assert.IsFalse  (localFilePath.fileExists());
            Assert.IsNotNull(qaConfigLoader.load());
            Assert.IsTrue   (localFilePath.fileExists());

            //delete temp folder
            Assert.IsTrue  (tmpFolder.dirExists());
            Assert.IsTrue  (Files.deleteFolder(tmpFolder, true));
            Assert.IsFalse(tmpFolder.dirExists());
        }
Esempio n. 9
0
        public static TM_QA_Config                  create(this TM_QA_Config_Loader configLoader)
        {
            var tmQaConfig = new TM_QA_Config()
            {
                Url_Target_TM_Site  = "http://*****:*****@securityinnovation.com",
                Default_Admin_User  = Tests_Consts.DEFAULT_ADMIN_USERNAME,
                Default_Admin_Pwd   = Tests_Consts.DEFAULT_ADMIN_PASSWORD,
            };

            var targetFile = configLoader.localFilePath();

            targetFile.parentFolder().createDir();              // ensure that is exists

            tmQaConfig.addDefaultTestUsers()
            .saveAs(targetFile);
            return(tmQaConfig);
        }
Esempio n. 10
0
 //Load,  Create, save
 public static string                        localFilePath(this TM_QA_Config_Loader configLoader)
 {
     return(configLoader.LocalFolder.pathCombine(configLoader.FileName));
 }
Esempio n. 11
0
 public static TM_QA_Config save_QAConfig(this TM_QA_Config qaConfig          )
 {
     if (qaConfig.notNull())
     {
         var localFilePath = new TM_QA_Config_Loader().localFilePath();
         qaConfig.saveAs(localFilePath);
     }
     return qaConfig;
 }
Esempio n. 12
0
 public TestFixture_WebServices()
 {
     QAConfig = new TM_QA_Config_Loader().load();
     this.set_TM_Server();
     QAConfig.assertIgnore_If_Offine(webServices.TargetServer);
 }
Esempio n. 13
0
        public void setup()
        {
            qaConfigLoader = new TM_QA_Config_Loader();
            qaConfig       = new TM_QA_Config_Loader().load();

            Assert.IsNotNull(qaConfigLoader);
            Assert.IsNotNull(qaConfig);
            Assert.IsFalse  (TM_QA_Config.Force_Server_Offline);
        }
Esempio n. 14
0
 public TestFixture_WebServices()
 {
     QAConfig = new TM_QA_Config_Loader().load();
     this.set_TM_Server();
     QAConfig.assertIgnore_If_Offine(webServices.TargetServer);
 }