public void usernameTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     string actual;
     actual = target.username;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 2
0
 public static ClientConnection Connection(MetlConfiguration config,Credentials creds,IAuditor auditor)
 {
     return auditor.wrapFunction(((auditAction) =>
     {
         var webCreds = new NetworkCredential(creds.name, creds.password);
         auditAction(GaugeStatus.InProgress,7);
         //var jabberCreds = new Credentials(config.xmppUsername, config.xmppPassword,new List<AuthorizedGroup>(),"");
         var wcf = new WebClientFactory(webCreds,auditor,creds);
         auditAction(GaugeStatus.InProgress,14);
         var receiveEvents = new ProductionReceiveEvents(auditor);
         auditAction(GaugeStatus.InProgress,21);
         var authProvider = new AuthorisationProvider(wcf, config,auditor);
         auditAction(GaugeStatus.InProgress,28);
         var httpProvider = new HttpResourceProvider(wcf,auditor);
         auditAction(GaugeStatus.InProgress,35);
         var resourceUploaderFactory = new ProductionResourceUploaderFactory(config, httpProvider,auditor);
         auditAction(GaugeStatus.InProgress,42);
         var resourceUploader = resourceUploaderFactory.get();
         auditAction(GaugeStatus.InProgress,49);
         var resourceCache = new ResourceCache();
         auditAction(GaugeStatus.InProgress,56);
         var configurationProvider = new ConfigurationProvider(wcf,auditor);
         auditAction(GaugeStatus.InProgress,63);
         auditAction(GaugeStatus.InProgress,70);
         var jabberWireFactory = new JabberWireFactory(config, creds, configurationProvider,resourceUploader,resourceCache, receiveEvents, wcf, httpProvider,auditor);
         auditAction(GaugeStatus.InProgress,77);
         var userOptionsProvider = new UserOptionsProvider(config, httpProvider, resourceUploader);
         auditAction(GaugeStatus.InProgress,84);
         var cc = new ClientConnection(config, receiveEvents, authProvider, resourceUploader, jabberWireFactory.conversationDetailsProvider, resourceCache, jabberWireFactory, wcf, userOptionsProvider, httpProvider,auditor);
         auditAction(GaugeStatus.InProgress, 91);
         return cc;
     }), "create client connection", "backend");
 }
Ejemplo n.º 3
0
 public MainWindow()
 {
     Trace.Listeners.Add(new ConsoleTraceListener());
     InitializeComponent();
     onExtendedDesktop();
     ClientFactory.kernel.Unbind<HttpHistoryProvider>();
     ClientFactory.kernel.Bind<HttpHistoryProvider>().To<LiveHttpHistoryProvider>().InSingletonScope();
     conn = ClientFactory.Connection(MeTLServerAddress.serverMode.PRODUCTION);
     conn.events.StatusChanged += new MeTLLibEventHandlers.StatusChangedEventHandler(events_StatusChanged);
     conn.Connect("chagan", "vidcajun2");
 }
 public void ClientConnectionConstructorTest()
 {
     Uri server = null; // TODO: Initialize to an appropriate value
     ClientConnection target = new ClientConnection(server);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
 public void AsyncRetrieveHistoryOfTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     int room = 0; // TODO: Initialize to an appropriate value
     target.AsyncRetrieveHistoryOf(room);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void ConnectTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.Connect(username, password);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void DisconnectTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.Disconnect();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void MoveToTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     int slide = 0; // TODO: Initialize to an appropriate value
     target.MoveTo(slide);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void AvailableConversationsTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     List<ConversationDetails> actual;
     actual = target.AvailableConversations;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void SendQuizAnswerTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     QuizAnswer qa = null; // TODO: Initialize to an appropriate value
     target.SendQuizAnswer(qa);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void SendSubmissionTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     TargettedSubmission ts = null; // TODO: Initialize to an appropriate value
     target.SendSubmission(ts);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void SneakIntoTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     string room = string.Empty; // TODO: Initialize to an appropriate value
     target.SneakInto(room);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void UpdateConversationDetailsTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     ConversationDetails details = null; // TODO: Initialize to an appropriate value
     target.UpdateConversationDetails(details);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void UploadAndSendFileTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     MeTLStanzas.LocalFileInformation lfi = null; // TODO: Initialize to an appropriate value
     target.UploadAndSendFile(lfi);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void isConnectedTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.isConnected;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void ClientConnectionConstructorTest1()
 {
     ClientConnection target = new ClientConnection();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
 public void SendDirtyImageTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     TargettedDirtyElement tde = null; // TODO: Initialize to an appropriate value
     target.SendDirtyImage(tde);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void RetrieveHistoryOfTest()
 {
     ClientConnection target = new ClientConnection(); // TODO: Initialize to an appropriate value
     string room = string.Empty; // TODO: Initialize to an appropriate value
     PreParser expected = null; // TODO: Initialize to an appropriate value
     PreParser actual;
     actual = target.RetrieveHistoryOf(room);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 19
0
 public MainWindow()
 {
     InitializeComponent();
     client = ClientFactory.Connection(MeTLServerAddress.serverMode.STAGING);
     client.events.StatusChanged += (sender, args) => { Dispatcher.adoptAsync(() => { if (args.isConnected)setup(); }); };
     client.events.StrokeAvailable += (sender, args) => { Dispatcher.adoptAsync(() => inkCanvas.Strokes.Add(args.stroke.stroke)); };
     client.events.DirtyStrokeAvailable += (sender, args) =>
     {
         Dispatcher.adoptAsync(() =>
         {
             var strokesToRemove = new StrokeCollection();
             for (int i = 0; i < inkCanvas.Strokes.Count; i++)
             {
                 var child = inkCanvas.Strokes[i];
                 if (child is Stroke && ((Stroke)child).startingSum().ToString() == args.dirtyElement.identifier)
                     strokesToRemove.Add(inkCanvas.Strokes[i]);
             }
             foreach (Stroke removedStroke in strokesToRemove)
                 inkCanvas.Strokes.Remove(removedStroke);
             ;
         });
     };
     client.events.TextBoxAvailable += (sender, args) =>
     {
         Dispatcher.adoptAsync(() =>
         {
             var box = args.textBox.box;
             box.Background = Brushes.Transparent;
             box.BorderBrush = Brushes.Transparent;
             box.BorderThickness = new Thickness(0);
             inkCanvas.Children.Add(box);
         });
     };
     client.events.DirtyTextBoxAvailable += (sender, args) =>
         {
             Dispatcher.adoptAsync(() =>
             {
                 for (int i = 0; i < inkCanvas.Children.Count; i++)
                 {
                     var child = inkCanvas.Children[i];
                     if (child is TextBox && ((TextBox)child).tag().id == args.dirtyElement.identifier)
                         inkCanvas.Children.Remove(inkCanvas.Children[i]);
                 }
                 ;
             });
         };
     client.events.ImageAvailable += (sender, args) => { Dispatcher.adoptAsync(() => inkCanvas.Children.Add(args.image.image)); };
     client.events.DirtyImageAvailable += (sender, args) =>
     {
         Dispatcher.adoptAsync(() =>
         {
             for (int i = 0; i < inkCanvas.Children.Count; i++)
             {
                 var child = inkCanvas.Children[i];
                 if (child is Image && ((Image)child).tag().id == args.dirtyElement.identifier)
                     inkCanvas.Children.Remove(inkCanvas.Children[i]);
             }
             ;
         });
     };
     client.events.VideoAvailable += (sender, args) =>
     {
         Dispatcher.adoptAsync(() =>
         {
             var me = args.video.video.MediaElement;
             me.LoadedBehavior = MediaState.Play;
             Canvas.SetLeft(me, args.video.X);
             Canvas.SetTop(me, args.video.Y);
             me.Width = args.video.Width;
             me.Height = args.video.Height;
             inkCanvas.Children.Add(me);
         });
     };
     client.events.PreParserAvailable += (sender, args) =>
     {
         Dispatcher.adoptAsync(() =>
             {
                 var parser = ((PreParser)args.parser);
                 foreach (TargettedVideo video in parser.videos.Values)
                 {
                     var me = video.video.MediaElement;
                     me.LoadedBehavior = MediaState.Play;
                     Canvas.SetLeft(me, video.video.X);
                     Canvas.SetTop(me, video.video.Y);
                     me.Width = video.video.Width;
                     me.Height = video.video.Height;
                     inkCanvas.Children.Add(me);
                 }
                 foreach (TargettedImage image in parser.images.Values)
                     inkCanvas.Children.Add(image.image);
                 foreach (TargettedTextBox textBox in parser.text.Values)
                     inkCanvas.Children.Add(textBox.box);
                 foreach (TargettedStroke stroke in parser.ink)
                     inkCanvas.Strokes.Add(stroke.stroke);
             });
     };
     client.events.FileAvailable += (sender, args) =>
     {
         var a = sender;
         var b = args;
         MessageBox.Show(a + ":" + b.file.name + ":" + b.file.url);
     };
     username.Text = "eecrole";
     password.Password = "******";
     attemptToAuthenticate(this, new RoutedEventArgs());
 }