public void FromStringTest() { const string fieldsString = "F1, F2,F3"; var expected = new[] { new Field("F1"), new Field("F2"), new Field("F3") }; var actual = FieldGenerator.FromString(fieldsString).ToArray(); Assert.AreEqual(expected.Count(), actual.Count()); Assert.AreEqual(expected[0].Name, actual[0].Name); Assert.AreEqual(expected[1].Name, actual[1].Name); Assert.AreEqual(expected[2].Name, actual[2].Name); }