Ejemplo n.º 1
0
        public void ManagerSetup()
        {
            this.provider = new MockConnectionProvider(GablarskiProtocol.Instance);
            this.provider.Start(MessageTypes.All);

            var connections = this.provider.GetConnections(GablarskiProtocol.Instance);

            this.server = new ConnectionBuffer(connections.Item2);
            this.client = connections.Item1;

            userProvider = new MockUserProvider();
            context      = new MockClientContext(client)
            {
                ServerInfo = new ServerInfo(new ServerSettings(), userProvider)
            };

            var channels = new ClientChannelManager(context);

            ClientChannelManagerTests.PopulateChannels(channels, this.server);

            this.userManager = new ClientUserManager();
            this.handler     = new ClientUserHandler(context, userManager);
            context.Users    = this.handler;
            context.Channels = channels;
        }
Ejemplo n.º 2
0
        public void ManagerSetup()
        {
            this.provider = new MockConnectionProvider(GablarskiProtocol.Instance);
            this.provider.Start(MessageTypes.All);

            var connections = this.provider.GetConnections(GablarskiProtocol.Instance);

            this.server = new ConnectionBuffer(connections.Item2);
            this.client = connections.Item1;

            context = new MockClientContext(this.client);
            var channels = new ClientChannelManager(context);

            ClientChannelManagerTests.PopulateChannels(channels, server);

            context.Users       = new ClientUserHandler(context, new ClientUserManager());
            context.Channels    = channels;
            context.CurrentUser = new CurrentUser(context, 1, "Foo", channels.First().ChannelId);

            this.manager = new ClientSourceManager(context);
        }