Example #1
0
 public void Window_ClosingTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     CancelEventArgs e = null; // TODO: Initialize to an appropriate value
     target.Window_Closing(sender, e);
 }
Example #2
0
 public void LoginTimer_TickTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     EventArgs e = null; // TODO: Initialize to an appropriate value
     target.LoginTimer_Tick(sender, e);
 }
Example #3
0
        public void OnDataSavedTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value

            target.OnDataSaved();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
 public void AddPersonClickTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     RoutedEventArgs e = null; // TODO: Initialize to an appropriate value
     target.AddPersonClick(sender, e);
     //Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void Button3ClickTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
     object sender = null; // TODO: Initialize to an appropriate value
     RoutedEventArgs e = null; // TODO: Initialize to an appropriate value
        // target.button3_Click(sender, e);
     //Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Example #6
0
        public void TrainAndTestFaceViewModel_ControlStateChangedTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
            object sender           = null;                         // TODO: Initialize to an appropriate value
            ControlReadyEventArgs e = null;                         // TODO: Initialize to an appropriate value

            target.TrainAndTestFaceViewModel_ControlStateChanged(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
        public void textbox_KeyDownTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
            object       sender        = null;                      // TODO: Initialize to an appropriate value
            KeyEventArgs e             = null;                      // TODO: Initialize to an appropriate value

            target.textbox_KeyDown(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Example #8
0
        public void PreprocessingPanelControl_PreprocessingPanelVisibleEventTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
            object    sender           = null;                      // TODO: Initialize to an appropriate value
            EventArgs e = null;                                     // TODO: Initialize to an appropriate value

            target.PreprocessingPanelControl_PreprocessingPanelVisibleEvent(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Example #9
0
        public void RecognizeMethodsViewModelBase_DrawRecongitionResultsEventTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
            object             sender  = null;                      // TODO: Initialize to an appropriate value
            RecognizeEventArgs e       = null;                      // TODO: Initialize to an appropriate value

            target.RecognizeMethodsViewModelBase_DrawRecongitionResultsEvent(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Example #10
0
        public void CheckOpenedPlayerTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.CheckOpenedPlayer();
            Assert.AreEqual(1, actual);

            Process.Start("C:\\Program Files (x86)\\Windows Media Player\\wmplayer.exe");
            System.Threading.Thread.Sleep(1000);
            actual = target.CheckOpenedPlayer();
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #11
0
        public void getQuestionsNoTest()
        {
            MainWindow_Accessor mainWindow = new MainWindow_Accessor();
            mainWindow.EventKeyLBL.Text = "tr5968TRG";
            string serverName = "10.211.55.12";

            mainWindow.initSystem(serverName);

               // MainWindow_Accessor target = new MainWindow_Accessor();
            int expected = 0;
            int actual;
            actual = mainWindow.getQuestionsNo();
            Assert.AreNotEqual(expected, actual);
        }
        public void FillCityListTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor();

            target.InfoFlightForm_Loaded(target, null);
            target.FillCityList();
            string[] expected = { "Київ",  "Лондон",
                                  "Париж", "Відень","Москва",  "Берлін", "Мюнхен", "Мадрид" };
            string[] actual = new string[target.cityList.Items.Count];
            for (int i = 0; i < target.cityList.Items.Count; i++)
            {
                actual[i] = target.cityList.Items[i].ToString();
                Assert.AreEqual(expected[i], actual[i]);
            }
        }
        public void SelectXYTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor();

            MainWindow.logUser = 1;
            target.InfoFlightForm_Loaded(target, null);
            DateTime      timeFlight = Convert.ToDateTime("10:00");
            List <Flight> expected   = new List <Flight>(10);

            expected.Add(new Flight("КВ-834", "Відень", "13:40", "45"));
            List <Flight> actual;

            target.selectedCityList.Add(new Flight("КВ-834", "Відень", "13:40", "45"));
            target.selectedCityList.Add(new Flight("КМ-202", "Відень", "7:35", "32"));
            actual = target.SelectXY(timeFlight);
            Assert.AreEqual(expected[0].ToString(), actual[0].ToString());
        }
        public void SelectXTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor();

            MainWindow.logUser = 1;
            target.InfoFlightForm_Loaded(target, null);
            target.LoadDataMenuItem_Click(target, null);
            string        selCity  = "Відень";
            List <Flight> expected = new List <Flight>(10);

            expected.Add(new Flight("КВ-834", "Відень", "13:40", "45"));

            List <Flight> actual;

            actual = target.SelectX(selCity);
            Assert.AreEqual(expected[0].ToString(), actual[0].ToString());
        }
Example #15
0
 public void _CreateDelegateTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Initialize to an appropriate value
     Type delegateType = null; // TODO: Initialize to an appropriate value
     string handler = string.Empty; // TODO: Initialize to an appropriate value
     Delegate expected = null; // TODO: Initialize to an appropriate value
     Delegate actual;
     actual = target._CreateDelegate(delegateType, handler);
     Assert.AreEqual(expected, actual);
 }
Example #16
0
        public void CheckOpenedPlayerTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor();
            int playerRunning = 0, playerNotRunning = 1;
            int actual;

            // Run CheckOpenPlayer() without any running WMP instances
            actual = target.CheckOpenedPlayer();
            Assert.AreEqual(playerNotRunning, actual);

            //Runs an instance of WMP to check if CheckOpenedPlayer can detect it
            Process wmp = setupProc();
            System.Threading.Thread.Sleep(1000);
            actual = target.CheckOpenedPlayer();
            Assert.AreEqual(playerRunning, actual);
            ControlFunction.Execute(Parameter.play);
            System.Threading.Thread.Sleep(1000);
            Console.Out.WriteLine("process ID: " + wmp.Id);
            wmp.Kill();
        }
Example #17
0
        public void CheckOpenedPlayerTest()
        {
            MainWindow_Accessor target = new MainWindow_Accessor();
            int playerRunning = 0, playerNotRunning = 1;
            int actual;
            Stopwatch sw = new Stopwatch();
            long elapsed = 0; 

            // Run CheckOpenPlayer() without any running WMP instances
            actual = target.CheckOpenedPlayer();
            Assert.AreEqual(playerNotRunning, actual);

            //Runs an instance of WMP to check if CheckOpenedPlayer can detect it
            Process wmp = setupProc();  // run media player
            sw.Start();
            while (wmp.MainWindowHandle == IntPtr.Zero) // spin until media player window appears
            {
                elapsed = sw.ElapsedMilliseconds; 
                if (elapsed > 2000)
                {
                    break; // break spin if waited for more than 2 seconds
                }
            }
            sw.Stop();
            actual = target.CheckOpenedPlayer();
            wmp.Kill();
            Assert.AreEqual(playerRunning, actual);
        }
Example #18
0
 public void userSetCellTest()
 {
     MainWindow_Accessor target = new MainWindow_Accessor(); // TODO: Passenden Wert initialisieren
     uint userid = 0; // TODO: Passenden Wert initialisieren
     WorldPosition position = null; // TODO: Passenden Wert initialisieren
     uint value = 0; // TODO: Passenden Wert initialisieren
     target.userSetCell(userid, position, value);
     Assert.Inconclusive("Eine Methode, die keinen Wert zurückgibt, kann nicht überprüft werden.");
 }