public void TestExecuteFaildsNotCheckPublishStrict() { var file = Helper.Fixtrue("Command/validate-failds.json"); var tester = new TesterCommand(new CommandValidate()); Assert.AreEqual(ExitCodes.ValidationWarning, tester.Execute($"--no-check-publish --strict {file}")); }
public void TestExecuteFaildsNotCheckPublish() { var file = Helper.Fixtrue("Command/validate-failds.json"); var tester = new TesterCommand(new CommandValidate()); Assert.AreEqual(GameBox.Console.ExitCodes.Normal, tester.Execute($"--no-check-publish {file}")); }
public void TestExecuteWithFileArgumentRelative() { var tester = new TesterCommand(new CommandValidate()); Assert.AreEqual(GameBox.Console.ExitCodes.Normal, tester.Execute("Fixtures/Command/validate-normal.json", AbstractTester.OptionDecorated(false))); StringAssert.Contains(tester.GetDisplay(), "Fixtures/Command/validate-normal.json is valid."); }
public void TestExecute() { var tester = new TesterCommand(new CommandValidate()); Assert.AreEqual(ExitCodes.FileNotFoundException, tester.Execute()); StringAssert.Contains(tester.GetDisplay(), "not found."); }
public void TestExecute() { var tester = new TesterCommand(new CommandAbout()); Assert.AreEqual(ExitCodes.Normal, tester.Execute()); StringAssert.Contains( tester.GetDisplay(), @" Bucket - Package Dependency Manager Bucket is a dependency manager tracking local dependencies of your projects and libraries. See https://github.com/getbucket/bucket/wiki for more information. "); }
public void TestExecuteFailds() { var file = Helper.Fixtrue("Command/validate-failds.json"); var tester = new TesterCommand(new CommandValidate()); Assert.AreEqual(ExitCodes.ValidationErrors, tester.Execute(file)); var display = tester.GetDisplay(); StringAssert.Contains(display, "strict errors that make it unable to be published as a package:"); StringAssert.Contains(display, "bar, baz are required both in require and require-dev, this can lead to unexpected behavior."); StringAssert.Contains(display, "Name \"fooBarBaz\" does not match the best practice (e.g. lower-cased/with-dashes). We suggest using \"foo-bar-baz\" instead."); StringAssert.Contains(display, "It is recommended to add a provider name to the package (e.g. provide-name/package-name)."); }
public void TestGetAllCapabilities(ConfigBucket bucket) { var package = new LoaderPackage().Load(bucket); pluginManager.ActivatePackages(package); var capabilities = pluginManager.GetAllCapabilities <ICommandProvider>(bucket, io); Assert.AreEqual(1, capabilities.Length); var command = capabilities[0].GetCommands().First(); var testerCommand = new TesterCommand(command); Assert.AreEqual(ExitCodes.Normal, testerCommand.Execute()); var display = testerCommand.GetDisplay(); StringAssert.Contains(display, "Command foo"); }