Exemplo n.º 1
0
        public async void NPM_IsInstalled_Tests(string commandOuput, bool expected)
        {
            mock.Reset();
            var result = CreateCommandResult(commandOuput);
            var t      = Task.FromResult(result);

            mock.Setup(service => service.RunIsCommandInstalled(NPMInstallationHandler.NPM_INSTALLATION_CHECK_COMMAND)).Returns(t);
            var npi = new NPMInstallationHandler(mock.Object);

            bool isInstalled = await npi.IsInstalled();

            Assert.Equal(expected, isInstalled);
        }
 public async Task <bool> IsInstalled()
 {
     return(await npmInstallationHandler.IsInstalled());
 }