public void FahClientMessageIdentifier_AreNotSameObjectTypes() { object id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1)); object id2 = "foo"; Assert.IsFalse(id1.Equals(id2)); }
public void FahClientMessageIdentifier_AreNotEqualHashCodes() { var id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1)); var id2 = new FahClientMessageIdentifier("bar", new DateTime(2019, 1, 1)); Assert.IsFalse(id1.GetHashCode().Equals(id2.GetHashCode())); }
public void FahClientMessageIdentifier_ObjectDoesNotEqualNull() { object id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1)); object id2 = null; Assert.IsFalse(id1.Equals(id2)); }
public void FahClientMessageIdentifier_AreEqualObjects() { object id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1)); object id2 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1)); Assert.IsTrue(id1.Equals(id2)); }
/// <summary> /// Initializes a new instance of the <see cref="FahClientMessage"/> class. /// </summary> /// <param name="identifier">The message identifier.</param> /// <param name="messageText">The text value of the message.</param> /// <param name="messageFormat">The message format identifier or null for no format identifier.</param> public FahClientMessage(FahClientMessageIdentifier identifier, StringBuilder messageText, string messageFormat) { Identifier = identifier; MessageText = messageText; MessageFormat = messageFormat; }