Exemplo n.º 1
0
        public void TestInitialize()
        {
            var messageService = new TestMessageService();
            var roomService    = new TestRoomServiceAdapter();
            var viewLocator    = new ViewLocator();

            viewModelFactory = new ViewModelFactory(roomService, messageService, viewLocator);
            mergedOc         = new MergedObservableCollection <IWorkspaceItem>();
            whiteboards      = new ObservableCollection <WhiteboardViewModel>();
            sharedFiles      = new ObservableCollection <SharedFileViewModel>();
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            var roomService = new TestRoomServiceAdapter();

            roomService.CreateClient();
            var messageService = new TestMessageService();
            var viewLocator    = new ViewLocator();

            viewModelFactory = new ViewModelFactory(roomService, messageService, viewLocator);
            roomViewModel    = viewModelFactory.GetViewModel <RoomViewModel>();
        }
Exemplo n.º 3
0
        public void TestDuplexTcp500ClientsSend1Msg()
        {
            const int maxClients = 500;

            int[] sentMessages = { 0 };
            for (int i = 0; i < maxClients; i++)
            {
                var service = TestRoomServiceAdapter.GetRoomServiceBasedOnTcp();
                service.PingCompleted += delegate
                {
                    sentMessages[0]++;
                    service.CloseCompleted += delegate
                    {
                        service = null;
                    };
                    service.CloseAsync();
                };
                service.PingAsync();
            }

            EnqueueConditional(() => sentMessages[0] == maxClients);
            EnqueueTestComplete();
        }