private void StubTierFormFieldSheetData(IExcelLoader loader, params string[] tierNames)
 {
     loader.Stub(x => x.Sheet<TierFormField>())
           .Return(this.GetFixture().Create<ISheetInfo<TierFormField>>());
     var items = tierNames.Select(x => new TierFormField {TierName = x}).ToList();
     loader.Sheet<TierFormField>().Stub(x => x.Data).Return(items);
 }
 private void StubCustomTierSheetData(IExcelLoader loader, params string[] tierNames)
 {
     loader.Stub(x => x.Sheet<CustomTier>())
           .Return(this.GetFixture().Create<ISheetInfo<CustomTier>>());
     var items = tierNames.Select(x => new CustomTier {TierName = x}).ToList();
     loader.Sheet<CustomTier>().Stub(x => x.Data).Return(items);
 }
 private void StubTierFormFieldSheetData(IExcelLoader loader, string formOid, string fieldOid)
 {
     loader.Stub(x => x.Sheet<TierFormField>())
           .Return(this.GetFixture().Create<ISheetInfo<TierFormField>>());
     var items = new[] { new TierFormField { FormOid = formOid, FieldOid = fieldOid } }.ToList();
     loader.Sheet<TierFormField>().Stub(x => x.Data).Return(items);
 }
 private void StubTierFormFolderSheetData(IExcelLoader loader, params string[] folderOids)
 {
     loader.Stub(x => x.Sheet<TierFormFolder>())
           .Return(this.GetFixture().Create<ISheetInfo<TierFormFolder>>());
     loader.Sheet<TierFormFolder>().Stub(x => x.Definition).Return(this.GetFixture().Create<ISheetDefinition>());
     var colDefs = folderOids.Select(x => new ColumnDefinition { PropertyName = x, ExtraProperty = true });
     loader.Sheet<TierFormFolder>().Definition.Stub(x => x.ColumnDefinitions).Return(colDefs);
 }
        private void StubBlockPlanSettingsExtraColumns(IExcelLoader loader, string extraPropName)
        {
            loader.Stub(x => x.Sheet<BlockPlanSetting>())
                  .Return(this.GetFixture().Create<ISheetInfo<BlockPlanSetting>>());
            loader.Sheet<BlockPlanSetting>()
                  .Stub(x => x.Definition)
                  .Return(this.GetFixture().Create<ISheetDefinition>());

            var colDefs = new[]
                          {
                              new ColumnDefinition {ExtraProperty = false, PropertyName = "Col1"},
                              new ColumnDefinition {ExtraProperty = false, PropertyName = "Col2"},
                              new ColumnDefinition {ExtraProperty = true, PropertyName = extraPropName}
                          };
            loader.Sheet<BlockPlanSetting>()
                  .Definition
                  .Stub(x => x.ColumnDefinitions)
                  .Return(colDefs);
        }
        private void StubCustomTierSheetData(IExcelLoader loader)
        {
            loader.Stub(x => x.Sheet<CustomTier>())
                  .Return(this.GetFixture().Create<ISheetInfo<CustomTier>>());

            var customDatas = new[]
                              {
                                  new CustomTier
                                  {
                                      TierName = "CustomTier1",
                                      TierDescription = this.GetFixture().Create<string>()
                                  },
                                  new CustomTier
                                  {
                                      TierName = "CustomTier2",
                                      TierDescription = this.GetFixture().Create<string>()
                                  }
                              };
            loader.Sheet<CustomTier>().Stub(x => x.Data).Return(customDatas);
        }