public void NewDataReceivedTest() { string testString = "The big black dog ate the small white cat"; EncodedConnectionMock connection = new EncodedConnectionMock(); byte[] data = connection.Encoding.GetBytes(testString); connection.OnEncodedDataReceived += (object sender, EncodedDataReceivedEventArgs eventArgs) => { Assert.AreEqual(testString, eventArgs.EncodedData); }; connection.SimulateReceivement(data); }
public void NewDataReceived_EventIsNullTest() { EncodedConnectionMock mock = new EncodedConnectionMock(); mock.SimulateReceivement(null); }
public void ConstructorTest() { EncodedConnectionMock connection = new EncodedConnectionMock(); Assert.IsNotNull(connection.Encoding); }