public void TestClientRequestSubscribe() { ClientRequestSubscribe crq = new ClientRequestSubscribe("queue1", "asodfjiasodf"); Assert.IsNotNull(crq); Assert.AreEqual(crq.Type, ERequestType.SUBSCRIBE); }
public void TestSubscribe() { string str = "testQueues"; var input = new StringReader(str); Console.SetIn(input); client.Subscribe(); Assert.AreEqual(server.ServerQueue.QueueA.Count, 1); var request = server.ServerQueue.QueueA.Dequeue(); Assert.AreEqual(request.Type, ERequestType.SUBSCRIBE); Assert.AreEqual(request.UserId, client.Id); ClientRequestSubscribe crq = (ClientRequestSubscribe)request; Assert.AreEqual(crq.QueueName, str); }