示例#1
0
        public void FahClientMessageIdentifier_AreNotSameObjectTypes()
        {
            object id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1));
            object id2 = "foo";

            Assert.IsFalse(id1.Equals(id2));
        }
示例#2
0
        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()));
        }
示例#3
0
        public void FahClientMessageIdentifier_ObjectDoesNotEqualNull()
        {
            object id1 = new FahClientMessageIdentifier("foo", new DateTime(2019, 1, 1));
            object id2 = null;

            Assert.IsFalse(id1.Equals(id2));
        }
示例#4
0
        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));
        }
示例#5
0
 /// <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;
 }