Esempio n. 1
0
        public void TestIsCustomChecksEnabledPositive(string baselineCustomChecksFilePath, string baselineCustomChecksFileHash, bool baselineCustomChecksEnabled)
        {
            Twin.ChangeConfiguration("baselineCustomChecksFilePath", baselineCustomChecksFilePath)
            .ChangeConfiguration("baselineCustomChecksFileHash", baselineCustomChecksFileHash)
            .ChangeConfiguration("baselineCustomChecksEnabled", baselineCustomChecksEnabled.ToString());

            Assert.IsTrue(BaselineEventGenerator.IsCustomChecksEnabled());
        }
Esempio n. 2
0
        public void TestIsCustomChecksEnabledPositive()
        {
            Twin.ChangeConfiguration("baselineCustomChecksFilePath", "/file/path")
            .ChangeConfiguration("baselineCustomChecksFileHash", "file_hash#")
            .ChangeConfiguration("baselineCustomChecksEnabled", "true");

            Assert.IsTrue(BaselineEventGenerator.IsCustomChecksEnabled());
        }
Esempio n. 3
0
        public void TestIsCustomChecksEnabledNegative()
        {
            Twin.ChangeConfiguration("baselineCustomChecksFilePath", null)
            .ChangeConfiguration("baselineCustomChecksFileHash", null)
            .ChangeConfiguration("baselineCustomChecksEnabled", "false");
            Assert.IsFalse(BaselineEventGenerator.IsCustomChecksEnabled());

            Twin.ChangeConfiguration("baselineCustomChecksEnabled", "true");
            Assert.IsFalse(BaselineEventGenerator.IsCustomChecksEnabled());

            Twin.ChangeConfiguration("baselineCustomChecksEnabled", "false");
            Twin.ChangeConfiguration("baselineCustomChecksFilePath", "not-null-or-empty");
            Assert.IsFalse(BaselineEventGenerator.IsCustomChecksEnabled());
        }