public void InitializeComponentTest() { PrivateObject param0 = new PrivateObject(typeof(ListenerSubClass)); Listener_Accessor target = new Listener_Accessor(param0); target.InitializeComponent(); Assert.IsNotNull(target.Components); }
public void OnAcceptorTest() { Listener_Accessor target = new Listener_Accessor(); // TODO: 初始化为适当的值 ServiceHandleSlim nonceClientHandler = ServiceHandleSlim.Zero; // TODO: 初始化为适当的值 ServiceHandleManager allHandlerManager = ServiceHandleManager.Zero; // TODO: 初始化为适当的值 ServiceHandle clientHandlerAtServer = null; // TODO: 初始化为适当的值 ServiceHandle clientHandlerAtServerExpected = null; // TODO: 初始化为适当的值 target.OnAcceptor(nonceClientHandler, allHandlerManager, out clientHandlerAtServer); Assert.AreEqual(clientHandlerAtServerExpected, clientHandlerAtServer); Assert.Inconclusive("无法验证不返回值的方法。"); }
public void OnDataReceivedTest() { bool eventRaised = false; PrivateObject param0 = new PrivateObject(typeof(ListenerSubClass)); Listener_Accessor target = new Listener_Accessor(param0); DataReceivedEventArgs e = new DataReceivedEventArgs(new byte[] {}); target.add_DataReceived(delegate { eventRaised = true; }); target.OnDataReceived(e); Assert.IsTrue(eventRaised); }
public void OnAcceptorTest() { Listener_Accessor target = new Listener_Accessor(); // TODO: 初始化为适当的值 ServiceHandleSlim nonceClientHandler = ServiceHandleSlim.Zero; // TODO: 初始化为适当的值 ServiceHandleManager allHandlerManager = ServiceHandleManager.Zero; // TODO: 初始化为适当的值 ServiceHandle clientHandlerAtServer = null; // TODO: 初始化为适当的值 ServiceHandle clientHandlerAtServerExpected = null; // TODO: 初始化为适当的值 target.OnAcceptor( nonceClientHandler, allHandlerManager, out clientHandlerAtServer ); Assert.AreEqual( clientHandlerAtServerExpected, clientHandlerAtServer ); Assert.Inconclusive( "无法验证不返回值的方法。" ); }