public void Send_ReturnCorrect_Case1() { string channelId = "channelId"; string messageId = "messageId"; string content = "content"; KtMmfEventBus event2 = new KtMmfEventBus(); event2.MessageReceived += OnMessageReceived; event2.SetConnectionInfo(false); event2.Connect(); _event1.Send(channelId, messageId, content); var expected = new EventBusMessageEventArgs(channelId, messageId, content); Thread.Sleep(100); event2.Disconnect(); event2.Dispose(); Assert.AreEqual(expected.ToExpectedObject(), _message); }
public void SetUp() { _event1 = new KtMmfEventBus(); _event1.ConnectionStatus += OnConnectionStatus; _event1.MessageReceived += OnMessageReceived; _event1.TransactionError += OnTransactionError; _event1.SetConnectionInfo(true); _event1.Connect(); }
private void btnConnect_Click(object sender, EventArgs e) { _eventBus.SetConnectionInfo(rdoMmfTypeOfMaster.Checked); _eventBus.Connect(); SetStatus(_eventBus.IsConnected); }