//----<automated unit test for connection>------
 private bool Test1()
 {
     Console.WriteLine("**********Connect to the remote repository server*********");
     try
     {
         ConnectButton.RaiseEvent(new RoutedEventArgs(MenuItem.ClickEvent));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        Task test1()
        {
            Task test1 = Task.Factory.StartNew(() =>
            {
                Console.WriteLine("\n-----Now beginning testing. -----\n");
                Console.WriteLine("\n-----Firstly demonstrate requirement 4. -----\n");
                Console.WriteLine("\n-----In Connect tab we can input local machine port. We suppose it be 8088.-----\n");
                Console.WriteLine("\n-----Then click connect button.----- \n");
            }).ContinueWith((t) =>
            {
                Dispatcher.Invoke((Action)(() =>
                {
                    ConnectButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
                }));
            });

            return(test1);
        }
Esempio n. 3
0
 //----< test for Connect >---------------------------------
 void testConnect()
 {
     ConnectButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, ConnectButton));
 }