Exemplo n.º 1
0
 public void EqualsMatchesResponseWithTheSameIdentifierAndTimestamp()
 {
     Response response1 = new Response();
     Response response2 = new Response();
     response1.RequestIdentifier = response2.RequestIdentifier;
     response1.Timestamp = response2.Timestamp;
     Assert.IsTrue(response1.Equals(response2));
 }
Exemplo n.º 2
0
 public void EqualsDoesNotMatchesResponseWithDifferentIdentifier()
 {
     Response response1 = new Response();
     Response response2 = new Response();
     response1.RequestIdentifier = "response1";
     response2.RequestIdentifier = "response2";
     Assert.IsFalse(response1.Equals(response2));
 }
Exemplo n.º 3
0
 public void EqualsDoesNotMatchesResponseWithDifferentTimestamp()
 {
     Response response1 = new Response();
     Response response2 = new Response();
     response1.Timestamp = DateTime.Now.AddMilliseconds(-1);
     response2.Timestamp = DateTime.Now;
     Assert.IsFalse(response1.Equals(response2));
 }
Exemplo n.º 4
0
 public void EqualsDoesNotMatchDifferentTypes()
 {
     var request = new Response();
     var different = new object();
     Assert.IsFalse(request.Equals(different));
 }