private IEnumerable <string> ExplodeAndFlatten(string explodeTableName, string entry, string flattenTableName)
        {
            var explodedCollection  = collectionsSelector.Explode(explodeTableName, entry);
            var allCollections      = collectionsSelector.SelectAllFrom(flattenTableName);
            var flattenedCollection = collectionsSelector.Flatten(allCollections, explodedCollection);

            return(flattenedCollection);
        }
示例#2
0
        public void Flatten_ReturnsInnerResult()
        {
            var collections = new Dictionary <string, IEnumerable <string> >();

            collections["my entry"]       = new[] { "entry 1", "entry 2" };
            collections["my other entry"] = new[] { "entry 3", "entry 4" };

            var keys = new[] { "key 1", "key 2" };

            mockInnerSelector
            .Setup(s => s.Flatten(collections, keys))
            .Returns(new[] { "my result", "my other result" });

            var result = proxy.Flatten(collections, keys);

            Assert.That(result, Is.EqualTo(new[] { "my result", "my other result" }));
        }
 public IEnumerable <string> Flatten(Dictionary <string, IEnumerable <string> > collections, IEnumerable <string> keys)
 {
     return(innerSelector.Flatten(collections, keys));
 }