Beispiel #1
0
 public FileRepository(ISettingsProvider settingsProvider, HttpServerUtilityBase server, IMimeTypeLookup mimeHelper)
 {
     this.mimeHelper = mimeHelper;
     root = settingsProvider.GetSettings<FunnelWebSettings>().UploadPath;
     // If it's a virtual path then we can map it, otherwise we'll expect that it's a windows path
     if (root.StartsWith("~"))
     {
         root = server.MapPath(root);
     }
 }
 public void SetUp()
 {
     Controller = new UploadController
                      {
                          FileRepository = FileRepository = Substitute.For<IFileRepository>(),
                          MimeHelper = MimeTypeLookup = Substitute.For<IMimeTypeLookup>(),
                          ControllerContext = ControllerContext
                      };
 }
 public FileRepositoryTests()
 {
     mimeTypeLookup = Substitute.For<IMimeTypeLookup>();
 }
 public void SetUp()
 {
     var settingsProvider = Substitute.For<ISettingsProvider>();
     settingsProvider.GetSettings<FunnelWebSettings>().Returns(new FunnelWebSettings());
     Controller = new UploadController
                      {
                          FileRepository = FileRepository = Substitute.For<IFileRepository>(),
                          MimeHelper = MimeTypeLookup = Substitute.For<IMimeTypeLookup>(),
                          ControllerContext = ControllerContext,
                          SettingsProvider = settingsProvider
                      };
 }