Exemplo n.º 1
0
        public void ExtensionsPacketsDurationInvalid()
        {
            Console.WriteLine("Clean machine.");
            BehaviorsRegression.CleanMachine();
            using (var systemSettings = new SystemSettings())
            {
                systemSettings.packetDuration = -10;
            }

            Console.WriteLine("Install AT and check services.");
            AT.Install();
            Thread.Sleep(timeToWait);
            Assert.IsFalse(AT.OsrExists(), "OSR process started with incorrect packet duration.");
            StopAllServices();

            Console.WriteLine("Check osrun time log file.");
            var errorNegativeDuration = "System.ArgumentException: Invalid maximum packet duration parameter.";
            var errorPacketBuilder    = "Error initializing Packet Builder";

            Assert.IsTrue(GetContentOfLog(nameOSRunTimeLog).Contains(errorNegativeDuration.Replace(" ", "")), "Incorrect error in osruntime log file. Negative value in  packet duration.");
            Assert.IsTrue(GetContentOfLog(nameOSRunTimeLog).Contains(errorPacketBuilder.Replace(" ", "")), "Incorrect error in osruntime log file. Packet builder.");

            Console.WriteLine("Clean machine.");
            BehaviorsRegression.CleanMachine();
        }
Exemplo n.º 2
0
 private static void InstallAt()
 {
     AT.Install();
     Assert.IsTrue(AT.WatchdogExists());
     Assert.IsTrue(AT.DttExists());
     Assert.IsTrue(AT.OsrExists());
 }
Exemplo n.º 3
0
        private static void InstallAt()
        {
            Console.WriteLine("Install AT");

            AT.Install();
            Assert.IsTrue(AT.WatchdogExists(), "Watch Dog service isn't started.");
            Assert.IsTrue(AT.DttExists(), "DTT service isn't started.");
            Assert.IsTrue(AT.OsrExists(), "OSR process isn't started.");
        }
Exemplo n.º 4
0
        public void Stable()
        {
            Preparation();
            InstallAt();

            CheckDtt();
            Assert.IsTrue(AT.WatchdogExists());
            Assert.IsTrue(AT.DttExists());
            Assert.IsTrue(AT.OsrExists());
            for (var i = 0; i < 2000; i++)
            {
                Calc = new Calculator(NunitSettings.CalcLocation);
                Thread.Sleep(DelayRunCalc);
                UserInputs.PressF1();
                Thread.Sleep(DelayHotKey);
                ////Call search in help window
                UserInputs.PressAltS();
                Thread.Sleep(DelayHotKey);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.A);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.C);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.F);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.G);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.N);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.O);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.P);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.S);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.V);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.X);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.Z);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.Shift);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.Escape);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.F6);
                UserInputs.PressHotKey((int)VirtualKeys.LaunchApplication1, (int)VirtualKeys.F6);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.F2);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.F1);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.D);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.Space);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.R);
                UserInputs.PressHotKey((int)VirtualKeys.LeftWindows, (int)VirtualKeys.U);
                UserInputs.PressHotKey((int)VirtualKeys.Shift, (int)VirtualKeys.Tab);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.Tab);
                UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.H);
                UserInputs.PressHotKey((int)VirtualKeys.Shift, (int)VirtualKeys.I);
            }
        }
Exemplo n.º 5
0
        public void ExtensionsCorruptedSystemSettings()
        {
            //TODO: to be refactored - file copy has to be in try-finaly clause
            Console.WriteLine("Change systemsettings.xml");
            BehaviorsRegression.CleanMachine();
            var xmlFile = File.ReadAllText(SystemSettings.FilePath);

            File.Copy(SystemSettings.FilePath, Path.Combine(NunitSettings.InstallFileLocation, NunitSettings.SystemSettingsNameFile.Replace(".xml", "1.xml")), true);
            string[] lines = { xmlFile, "<First line", "<Second line", "//>Third line" };
            System.IO.File.WriteAllLines(SystemSettings.FilePath, lines);

            Console.WriteLine("Install AT");
            AT.Install();
            Thread.Sleep(timeToWait);
            Assert.IsFalse(AT.OsrExists(), "OSR process is started without project path.");

            Console.WriteLine("Clean machine.");
            BehaviorsRegression.CleanMachine();
            File.Copy(Path.Combine(NunitSettings.InstallFileLocation, NunitSettings.SystemSettingsNameFile.Replace(".xml", "1.xml")), SystemSettings.FilePath, true);
        }
Exemplo n.º 6
0
        public void ExtensionsIncorrectPathToKey()
        {
            Console.WriteLine("Change systemsettings.xml");
            BehaviorsRegression.CleanMachine();
            using (var systemSettings = new SystemSettings())
            {
                systemSettings.keyRingPath = "incorrect path";
            }

            Console.WriteLine("Install AT");
            AT.Install();
            Thread.Sleep(timeToWait);
            Assert.IsFalse(AT.OsrExists(), "OSR process is started without project path.");
            StopAllServices();

            Console.WriteLine("Check os runtime log file");
            Assert.IsTrue(GetContentOfLog(nameOSRunTimeLog).Contains(errorMessageEmptyPathToKey.Replace(" ", "")) || GetContentOfLog(nameOSRunTimeLog).Contains(errorMessageEmptyPathToKeyXP.Replace(" ", "")), "Incorrect error in osruntime log file. Path to pubring key.");

            Console.WriteLine("Clean machine.");
            BehaviorsRegression.CleanMachine();
        }
Exemplo n.º 7
0
 public static void CheckProcess()
 {
     Assert.IsTrue(AT.WatchdogExists(), "Watch Dog service isn't started.");
     Assert.IsTrue(AT.DttExists(), "DTT service isn't started.");
     Assert.IsTrue(AT.OsrExists(), "OSR process isn't started.");
 }
Exemplo n.º 8
0
 private static void CheckProcessAndServicesAbsent()
 {
     Assert.IsFalse(AT.WatchdogExists(), "Watch Dog service isn't removed.");
     Assert.IsFalse(AT.DttExists(), "DTT service isn't removed.");
     Assert.IsFalse(AT.OsrExists(), "OSR process isn't removed.");
 }