public void ComputeSendPortNameViaSendPort() { const string name = "Send Port Name"; var sendPortMock = new Mock <ISendPort <object> >(); sendPortMock.Setup(m => m.Name).Returns(name); NamingConventionThunk.ComputeSendPortName(sendPortMock.Object).Should().Be(name); }
public void ComputeSendPortNameViaSendPort() { const string name = "Send Port Name"; var sendPortMock = new Mock <ISendPort <object> >(); sendPortMock.Setup(m => m.Name).Returns(name); Assert.That(NamingConventionThunk.ComputeSendPortName(sendPortMock.Object), Is.EqualTo(name)); }
public void ComputeSendPortNameViaNamingConvention() { var conventionMock = new Mock <INamingConvention <object> >(); var sendPortMock = new Mock <ISendPort <object> >(); sendPortMock.Setup(m => m.Name).Returns(conventionMock.Object); NamingConventionThunk.ComputeSendPortName(sendPortMock.Object); conventionMock.Verify(m => m.ComputeSendPortName(sendPortMock.Object), Times.Once()); }