public void TestParseInvariant() { CollectionUtils.ForEach(new[] { true, false }, b => { string b1 = b.ToString(CultureInfo.InvariantCulture); object b2 = value.ParseInvariant(b1); Assert.AreEqual(b, b2); }); }
// ReSharper disable PossibleMultipleEnumeration private void ValidateCollection(ICollectionFacet collectionFacet, INakedObject collection, IEnumerable <object> objects) { INakedObject[] collectionAsEnumerable = collectionFacet.AsEnumerable(collection, manager).ToArray(); Assert.AreEqual(collectionAsEnumerable.Count(), objects.Count()); IEnumerable <Tuple <object, object> > zippedCollections = collectionAsEnumerable.Zip(objects, (no, o1) => new Tuple <object, object>(no.Object, o1)); CollectionUtils.ForEach(zippedCollections, t => Assert.AreSame(t.Item1, t.Item2)); }