public void When_GetAllChannels_Should_Return_AllChannelds() { var manager = new ChannelsManager(_channelServiceMock.Object, _deviceRepositoryMock.Object); var result = manager.GetAllChannels(); Assert.IsNotNull(result); Assert.IsTrue(result.Count() == 2); }
public GeneralMessagesService(WebSocketConnectionManager manager, AccountsManagerWeb am, ChannelsManager cm, MessagesManagerWeb mmw) : base(manager) { _mmw = mmw; _am = am; _cm = cm; foreach (var c in cm.GetAllChannels()) { Channels.TryAdd(c.Id, new SocketChannel(c, _am)); } foreach (var r in cm.GetAllRooms()) { Rooms.TryAdd(r.Id, new SocketRoom(r, this, _am)); } }