public void Dispose()
 {
     RunDotnet(Path.GetDirectoryName(TestDotnetCli), "build-server shutdown");
     KillDotnetExe(TestDotnetCli);
     _cliDirectory.Dispose();
     _templateDirectory.Dispose();
 }
 public void TearDown()
 {
     if (_goodDir != null)
     {
         _goodDir.Dispose();
     }
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     _testDirectory?.Dispose();
     _solutionManager?.Dispose();
     _state?.Dispose();
     _projectManager?.Dispose();
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     WorkingPath.Dispose();
     TestFileSystemUtility.DeleteRandomTestFolder(SourceParamFolder);
     _sourceDirectory?.Dispose();
     _randomNupkgDirectory?.Dispose();
 }
            public void Dispose()
            {
                LocalResourceUtils.DeleteDirectoryTree(
                    Path.Combine(
                        SettingsUtility.GetPluginsCacheFolder(),
                        CachingUtility.RemoveInvalidFileNameChars(CachingUtility.ComputeHash(_pluginFilePath))),
                    new List <string>());
                PluginManager.Dispose();
                _testDirectory.Dispose();

                _reader.Verify();
                _pluginDiscoverer.Verify();

                foreach (var expectation in _expectations)
                {
                    _connection.Verify(x => x.SendRequestAndReceiveResponseAsync <GetOperationClaimsRequest, GetOperationClaimsResponse>(
                                           It.Is <MessageMethod>(m => m == MessageMethod.GetOperationClaims),
                                           It.Is <GetOperationClaimsRequest>(
                                               g => g.PackageSourceRepository == expectation.SourceRepository.PackageSource.Source),
                                           It.IsAny <CancellationToken>()), Times.Once());

                    var expectedSetCredentialsRequestCalls = expectation.OperationClaims.Any()
                        ? Times.Once() : Times.Never();

                    _connection.Verify(x => x.SendRequestAndReceiveResponseAsync <SetCredentialsRequest, SetCredentialsResponse>(
                                           It.Is <MessageMethod>(m => m == MessageMethod.SetCredentials),
                                           It.Is <SetCredentialsRequest>(
                                               g => g.PackageSourceRepository == expectation.SourceRepository.PackageSource.Source),
                                           It.IsAny <CancellationToken>()), expectedSetCredentialsRequestCalls);
                }

                _plugin.Verify();
                _factory.Verify();
            }
            public void Dispose()
            {
                SourceCacheContext.Dispose();
                _testDirectory.Dispose();

                GC.SuppressFinalize(this);
            }
        public override void Dispose()
        {
            _trustedTestCert?.Dispose();
            _trustedExpiredTestCert?.Dispose();
            _expiredSignedTestPackageV1Directory?.Dispose();

            base.Dispose();
        }
            public void Dispose()
            {
                _pluginManager.Dispose();
                _testDirectory.Dispose();

                _environmentVariableReader.Verify();
                _pluginDiscoverer.Verify();
            }
Exemplo n.º 9
0
            public void Dispose()
            {
                _stream.Dispose();
                TestDirectory.Dispose();

                GC.SuppressFinalize(this);

                ProjectSystem.Verify();
            }
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    _directory.Dispose();

                    _isDisposed = true;
                }
            }
 public void TearDown()
 {
     if (_goodDir1 != null)
     {
         _goodDir1.Dispose();
     }
     if (_goodDir2 != null)
     {
         _goodDir2.Dispose();
     }
 }
Exemplo n.º 12
0
            public void Dispose()
            {
                PluginManager.Dispose();
                _testDirectory.Dispose();

                _reader.Verify();
                _pluginDiscoverer.Verify();
                _connection.Verify();
                _plugin.Verify();
                _factory.Verify();
            }
Exemplo n.º 13
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    _directory.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    Package.Dispose();
                    _signedPackageReadStream.Dispose();
                    _directory.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 15
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    Request?.Dispose();
                    Options.Dispose();
                    _directory?.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 16
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    Reader.Dispose();
                    _tempFile.Dispose();
                    _testDirectory.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 17
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    _directory.Dispose();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override finalizer
                // TODO: set large fields to null
                disposedValue = true;
            }
        }
Exemplo n.º 18
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    _certificate?.Dispose();
                    _directory?.Dispose();
                    ReadStream.Dispose();
                    WriteStream.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 19
0
            public void Dispose()
            {
                if (!_isDisposed)
                {
                    AuthorRequest?.Dispose();
                    RepositoryRequest?.Dispose();
                    _authorCertificate?.Dispose();
                    _repositoryCertificate?.Dispose();
                    _directory?.Dispose();

                    GC.SuppressFinalize(this);

                    _isDisposed = true;
                }
            }
Exemplo n.º 20
0
        public void Dispose()
        {
            LocalResourceUtils.DeleteDirectoryTree(
                Path.Combine(
                    SettingsUtility.GetPluginsCacheFolder(),
                    CachingUtility.RemoveInvalidFileNameChars(CachingUtility.ComputeHash(_pluginFilePath))),
                new List <string>());
            PluginManager.Dispose();

            _reader.Verify();
            _pluginDiscoverer.Verify();
            if (_expectations.PluginLaunched)
            {
                _connection.Verify(x => x.SendRequestAndReceiveResponseAsync <GetOperationClaimsRequest, GetOperationClaimsResponse>(
                                       It.Is <MessageMethod>(m => m == MessageMethod.GetOperationClaims),
                                       It.Is <GetOperationClaimsRequest>(
                                           g => g.PackageSourceRepository == null), // The source repository should be null in the context of credential plugins
                                       It.IsAny <CancellationToken>()), Times.Once());

                if (_expectations.Success)
                {
                    _connection.Verify(x => x.SendRequestAndReceiveResponseAsync <GetAuthenticationCredentialsRequest, GetAuthenticationCredentialsResponse>(
                                           It.Is <MessageMethod>(m => m == MessageMethod.GetAuthenticationCredentials),
                                           It.IsAny <GetAuthenticationCredentialsRequest>(),
                                           It.IsAny <CancellationToken>()), Times.Once());
                }

                if (_expectations.ProxyUsername != null && _expectations.ProxyPassword != null)
                {
                    _connection.Verify(x => x.SendRequestAndReceiveResponseAsync <SetCredentialsRequest, SetCredentialsResponse>(
                                           It.Is <MessageMethod>(m => m == MessageMethod.SetCredentials),
                                           It.Is <SetCredentialsRequest>(e => e.PackageSourceRepository.Equals(_expectations.Uri.AbsolutePath) && e.Password == null && e.Username == null && e.ProxyPassword.Equals(_expectations.ProxyPassword) && e.ProxyUsername.Equals(_expectations.ProxyUsername)),
                                           It.IsAny <CancellationToken>()),
                                       Times.Once());
                }
            }
            _connection.Verify();

            _plugin.Verify();
            _factory.Verify();

            _testDirectory.Dispose();
        }
Exemplo n.º 21
0
        public void Dispose()
        {
            _trustedTestCert?.Dispose();
            _trustedTestCertWithInvalidEku?.Dispose();
            _trustedTestCertExpired?.Dispose();
            _trustedTestCertNotYetValid?.Dispose();
            _trustedTimestampRoot?.Dispose();
            _trustedTestCertChain?.Dispose();
            _revokedTestCertChain?.Dispose();
            _revocationUnknownTestCertChain?.Dispose();
            _crlServer?.Stop();
            _crlServer?.Dispose();
            _testDirectory?.Dispose();
            _responders.Dispose();

            if (_testServer.IsValueCreated)
            {
                _testServer.Value.Result.Dispose();
            }
        }
 public void Dispose()
 {
     WorkingPath.Dispose();
     _destinationDirectory?.Dispose();
     _sourceDirectory?.Dispose();
 }
Exemplo n.º 23
0
 public void Dispose()
 {
     _joinableTaskContext?.Dispose();
     _testDirectory.Dispose();
 }
 public void Dispose()
 {
     _directory?.Dispose();
 }
Exemplo n.º 25
0
 public void Dispose()
 => _directory.Dispose();
Exemplo n.º 26
0
 public void Dispose()
 {
     _testDirectory.Dispose();
 }
Exemplo n.º 27
0
 public void Dispose()
 {
     _rootDirectory.Dispose();
 }
Exemplo n.º 28
0
 public void Dispose()
 {
     TestDirectory.Dispose();
     GC.SuppressFinalize(this);
 }
 public void Dispose()
 {
     _projectDirectory.Dispose();
 }
Exemplo n.º 30
0
        protected override void Dispose(bool disposing)
        {
            _testDirectory?.Dispose();

            base.Dispose(disposing);
        }