title: Issues in Xunit.Assert.Collection - C#
body: <p>I have a Class Library, it contains the following Model and Method</p>
  
  <p>Model:</p>
  
  <pre><code>public class Employee {
      public int EmpId { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>public class EmployeeService {
      public List&lt;Employee&gt; GetEmployee() {
          return new List&lt;Employee&gt;() {
              new Employee() { EmpId = 1, Name = "John" },
              new Employee() { EmpId = 2, Name = "Albert John" },
              new Employee() { EmpId = 3, Name = "Emma" },
          }.Where(m =&gt; m.Name.Contains("John")).ToList();
      }
  }
  </code></pre>
  
  <p>I have a Test Method</p>
  
  <pre><code>[TestMethod()]
  public void GetEmployeeTest() {
      EmployeeService obj = new EmployeeService();
      var result = obj.GetEmployee();
      Xunit.Assert.Collection&lt;Employee&gt;(result, m =&gt; Xunit.Assert.Contains("John",m.Name));
  }
  </code></pre>
  
  <p>I got an Exception message</p>
  
  <pre><code>Assert.Collection() Failure
  Collection: [Employee { EmpId = 1, Name = "John" }, Employee { EmpId = 2, Name = "Albert John" }]
  Expected item count: 1
  Actual item count:   2
  </code></pre>
  
  <p>My requirement is to check all the <code>items.Name</code> should contain the sub string "John". Kindly assist me how to check using <code>Xunit.Assert.Collection</code></p>