/// <summary>
        /// Returns a file system implementation, which is assigned
        /// to the <see cref="TestContext.FileSystem"/> property.
        /// </summary>
        /// <param name="localTestFolder">The temporary test folder that is
        /// used by the context. This is actually just the <see cref="TestContext.LocalTestRoot"/>
        /// reference.</param>
        protected override IFileSystemProvider InitFileSystem(DirectoryInfo localTestFolder)
        {
            ServiceFileSystem = GetServiceProvider();
            var settings = new VfsServiceSettings();

            ServiceHost = new TestServiceHost {
                Configuration = new TestConfiguration(ServiceFileSystem, settings)
            };

            ServiceBaseUri = "http://localhost:33456/";
            ServiceHost.Initialize(new[] { ServiceBaseUri }, "/", null);
            ServiceHost.StartListening();

//      //TODO remove debug code
//      ServiceBaseUri = "http://127.0.0.1:56789/";

            return(new FileSystemFacade(ServiceBaseUri));
        }
예제 #2
0
 /// <summary>
 /// Gets the maximum block size for this kind of transfers.
 /// </summary>
 protected abstract int?GetSettingsMaxBlockSize(VfsServiceSettings settings);
예제 #3
0
 protected virtual VfsServiceSettings CustomizeSettings(VfsServiceSettings settings)
 {
     return(settings);
 }
예제 #4
0
 /// <summary>
 /// Gets the maximum block size for this kind of transfers.
 /// </summary>
 protected override int?GetSettingsMaxBlockSize(VfsServiceSettings settings)
 {
     return(settings.MaxUploadBlockSize);
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public TestConfiguration(IFileSystemProvider provider, VfsServiceSettings settings)
 {
     Provider = provider;
     Settings = settings;
 }