public void Setup()
        {
            table = new Dictionary<string, IEnumerable<string>>();
            mockInnerMapper = new Mock<CollectionsMapper>();
            mockInnerMapper.Setup(m => m.Map("table name")).Returns(table);

            proxy = new CollectionsMapperCachingProxy(mockInnerMapper.Object);
        }
        public void Setup()
        {
            fileName = tableName + ".xml";
            contents = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
                         <collections>
                             <object>
                                 <name>first name</name>
                                 <item>first item</item>
                                 <item>second item</item>
                             </object>
                             <object>
                                 <name>second name</name>
                                 <item>third item</item>
                             </object>
                             <object>
                                 <name>empty name</name>
                             </object>
                         </collections>";

            mockStreamLoader = new Mock<StreamLoader>();
            mockStreamLoader.Setup(l => l.LoadFor(fileName)).Returns(() => GetStream());

            mapper = new CollectionsXmlMapper(mockStreamLoader.Object);
        }
 public CollectionsMapperCachingProxy(CollectionsMapper innerMapper)
 {
     this.innerMapper = innerMapper;
     cachedTables = new Dictionary<String, Dictionary<String, IEnumerable<String>>>();
 }