public static void AssertAllCollectionTypes(AllCollectionTypes actual, AllCollectionTypes expected) { Assert.That(actual.IntArray, Is.EqualTo(expected.IntArray)); Assert.That(actual.IntList, Is.EqualTo(expected.IntList)); AssertListPoco(actual.PocoArray, expected.PocoArray); AssertListPoco(actual.PocoList, expected.PocoList); Assert.That(actual.PocoLookup.Count, Is.EqualTo(expected.PocoLookup.Count)); foreach (var key in actual.PocoLookup.Keys) { AssertListPoco(actual.PocoLookup[key], expected.PocoLookup[key]); } Assert.That(actual.PocoLookupMap.Count, Is.EqualTo(expected.PocoLookupMap.Count)); foreach (var key in actual.PocoLookupMap.Keys) { var actualList = actual.PocoLookupMap[key]; var expectedList = expected.PocoLookupMap[key]; Assert.That(actualList.Count, Is.EqualTo(expectedList.Count)); for (int i = 0; i < actualList.Count; i++) { Assert.That(actualList[i].Count, Is.EqualTo(expectedList[i].Count)); foreach (var key2 in actualList[i].Keys) { Assert.That(actualList[i][key2].Name, Is.EqualTo(expectedList[i][key2].Name)); } } } }
public object Any(AllCollectionTypes request) => request;