public void Should_FailEqualityForDifferentMessageTypes() { var deselectReq = new DeselectReq(1, 2); var deselectRsp = new DeselectRsp(1, 2, 1); Assert.IsFalse(deselectReq.Equals(deselectRsp)); }
public void Should_FailEqualityForDifferentMessageTypes() { var deselectRsp = new DeselectRsp(1, 2, 3); var linkTestRsp = new LinkTestRsp(1); Assert.IsFalse(deselectRsp.Equals(linkTestRsp)); }
public void Should_FailEqualityForDifferentDevice() { var deselectRsp = new DeselectRsp(2, 1, 3); var deselectRsp2 = new DeselectRsp(1, 1, 3); Assert.IsFalse(deselectRsp.Equals(deselectRsp2)); }
public void Should_BeEqualIfDeselectRspsEqual() { var deselectRsp = new DeselectRsp(1, 2, 3); var deselectRsp2 = new DeselectRsp(1, 2, 3); Assert.IsTrue(deselectRsp.Equals(deselectRsp2)); }
public void Should_FailEqualityForDifferetObjectTypes() { var deselectRsp = new DeselectRsp(1, 2, 3); var obj = "test"; Assert.IsFalse(deselectRsp.Equals(obj)); }
public void Should_FailEqualityForDifferentStatus() { var deselectRsp = new DeselectRsp(1, 2, 3); var deselectRsp2 = new DeselectRsp(1, 2, 4); Assert.IsFalse(deselectRsp.Equals(deselectRsp2)); }
public void Should_CreateCorrectDeselectRsp() { var deselectRsp = new DeselectRsp(1, 2, 3); Assert.IsTrue(deselectRsp.Type == MessageType.DeselectRsp); Assert.IsTrue(deselectRsp.Device == 1); Assert.IsTrue(deselectRsp.Context == 2); Assert.IsTrue(deselectRsp.Status == 3); }
/// <summary> /// /// </summary> /// <param name="deselectRsp"></param> protected void HandleDeselectRsp(DeselectRsp m) { if (_state == State.ConnectedSelected) { if (m.Status == 0) { _state = State.ConnectedNotSelected; } } }
public void Should_FailEqualityForNull() { var deselectRsp = new DeselectRsp(1, 2, 3); Assert.IsFalse(deselectRsp.Equals(null)); }
public void Should_SetIsReplyRequiredToFalse() { var deselectRsp = new DeselectRsp(1, 2, 3); Assert.IsTrue(!deselectRsp.IsReplyRequired); }
public void Should_SetIsPrimaryToFalse() { var deselectRsp = new DeselectRsp(1, 2, 3); Assert.IsTrue(!deselectRsp.IsPrimary); }