예제 #1
0
 private static void ComparePeople(GlobalXPerson expected, GlobalXPerson actual)
 {
     actual.ShouldNotBeNull();
     actual.ShouldSatisfyAllConditions(
         () => actual.Created.ShouldBe(expected.Created),
         () => actual.Username.ShouldBe(expected.Username),
         () => actual.UserId.ShouldBe(expected.UserId),
         () =>
     {
         if (expected.Emails != null)
         {
             actual.Emails.ShouldNotBeNull();
             actual.Emails.OrderBy(x => x).SequenceEqual(expected.Emails.OrderBy(x => x)).ShouldBe(true);
         }
         else
         {
             actual.Emails.ShouldBeNull();
         }
     },
         () => actual.Type.ShouldBe(expected.Type)
         );
 }
 private void ThenItShouldReturnPersonDetails(GlobalXPerson output)
 {
     _output.ShouldNotBeNull();
     _output.ShouldSatisfyAllConditions(
         () => _output.Created.ShouldBe(output.Created),
         () => _output.Username.ShouldBe(output.Username),
         () => _output.UserId.ShouldBe(output.UserId),
         () =>
     {
         if (output.Emails != null)
         {
             _output.Emails.ShouldNotBeNull();
             _output.Emails.OrderBy(x => x).SequenceEqual(output.Emails.OrderBy(x => x)).ShouldBe(true);
         }
         else
         {
             _output.Emails.ShouldBeNull();
         }
     },
         () => _output.Type.ShouldBe(output.Type)
         );
 }