public void ComputeReceivePortNameViaReceivePort()
        {
            const string name = "Receive Port Name";

            var receivePortMock = new Mock <IReceivePort <object> >();

            receivePortMock.Setup(m => m.Name).Returns(name);

            NamingConventionThunk.ComputeReceivePortName(receivePortMock.Object).Should().Be(name);
        }
Пример #2
0
        public void ComputeReceivePortNameViaReceivePort()
        {
            const string name = "Receive Port Name";

            var receivePortMock = new Mock <IReceivePort <object> >();

            receivePortMock.Setup(m => m.Name).Returns(name);

            Assert.That(NamingConventionThunk.ComputeReceivePortName(receivePortMock.Object), Is.EqualTo(name));
        }
        public void ComputeReceivePortNameViaNamingConvention()
        {
            var conventionMock = new Mock <INamingConvention <object> >();

            var receivePortMock = new Mock <IReceivePort <object> >();

            receivePortMock.Setup(m => m.Name).Returns(conventionMock.Object);

            NamingConventionThunk.ComputeReceivePortName(receivePortMock.Object);

            conventionMock.Verify(m => m.ComputeReceivePortName(receivePortMock.Object), Times.Once());
        }