public void constructor_should_initialize_instance() { var server = new Mock <IServer>().Object; var channel = new Mock <IChannelHandle>().Object; var session = new Mock <ICoreSessionHandle>().Object; var result = new ChannelChannelSource(server, channel, session); result._channel().Should().BeSameAs(channel); result._disposed().Should().BeFalse(); result.Server.Should().BeSameAs(server); result.Session.Should().BeSameAs(session); }
public static bool _disposed(this ChannelChannelSource obj) { var fieldInfo = typeof(ChannelChannelSource).GetField("_disposed", BindingFlags.NonPublic | BindingFlags.Instance); return((bool)fieldInfo.GetValue(obj)); }
public static IChannelHandle _channel(this ChannelChannelSource obj) { var fieldInfo = typeof(ChannelChannelSource).GetField("_channel", BindingFlags.NonPublic | BindingFlags.Instance); return((IChannelHandle)fieldInfo.GetValue(obj)); }