Beispiel #1
0
        public void FindEndpointTest1()
        {
            var serverInterface = TestsHelper.GetInProcessServerInterface();

            Assert.IsNotNull(serverInterface);

            var endPoint = serverInterface.RegisterEndpoint("test1");

            Assert.IsNotNull(endPoint);

            var foundEndPoint = serverInterface.FindEndpoint("test1");

            Assert.IsNotNull(foundEndPoint);
            Assert.AreEqual(endPoint, foundEndPoint);
        }
Beispiel #2
0
        public void CreateMessageTest3()
        {
            var serverInterface = TestsHelper.GetInProcessServerInterface();

            Assert.IsNotNull(serverInterface);

            var endPoint1 = serverInterface.RegisterEndpoint("test1");

            Assert.IsNotNull(endPoint1);

            var message = endPoint1.CreateMessage("test2");

            Assert.IsNotNull(message);

            message.Body = Encoding.UTF8.GetBytes("Hello, world!");

            Assert.Catch <ArgumentException>(() => message.CreateReply());
        }
Beispiel #3
0
        public void FindEndpointTest2()
        {
            var serverInterface = TestsHelper.GetInProcessServerInterface();

            Assert.IsNotNull(serverInterface);

            var endPoint1 = serverInterface.RegisterEndpoint("test1");

            Assert.IsNotNull(endPoint1);

            var endPoint2 = serverInterface.RegisterEndpoint("test1");

            Assert.IsNotNull(endPoint2);

            var foundEndPoint = serverInterface.FindEndpoint("test1");

            Assert.IsNotNull(foundEndPoint);
            Assert.IsTrue(endPoint1 == foundEndPoint || endPoint2 == foundEndPoint);
        }
Beispiel #4
0
        public void CreateMessageTest2()
        {
            var serverInterface = TestsHelper.GetInProcessServerInterface();

            Assert.IsNotNull(serverInterface);

            var endPoint1 = serverInterface.RegisterEndpoint("test1");

            Assert.IsNotNull(endPoint1);

            var message = endPoint1.CreateMessage("test2");

            Assert.IsNotNull(message);

            var bytes = Encoding.UTF8.GetBytes("Hello, world!");

            message.Body = bytes;
            Assert.AreEqual(bytes, message.Body);
        }
Beispiel #5
0
        public void ServerCreationTest()
        {
            var serverInterface = TestsHelper.GetInProcessServerInterface();

            Assert.IsNotNull(serverInterface);
        }