public void Should_Throw_If_Id_Setting_Not_Specified() { // Given var fixture = new ChocolateyPackerWithoutNuSpecFixture(); // When var result = Record.Exception(() => fixture.Run()); // Then Assert.IsCakeException(result, "Required setting Id not specified."); }
public void Should_Throw_If_Version_Setting_Not_Specified() { // Given var fixture = new ChocolateyPackerWithoutNuSpecFixture(); fixture.Settings.Id = "nonexisting"; // When var result = Record.Exception(() => fixture.Run()); // Then AssertEx.IsCakeException(result, "Required setting Version not specified."); }
public void Should_Throw_If_Description_Setting_Not_Specified() { // Given var fixture = new ChocolateyPackerWithoutNuSpecFixture(); fixture.Settings.Id = "nonexisting"; fixture.Settings.Version = "1.0.0"; fixture.Settings.Authors = new[] { "Author #1", "Author #2" }; // When var result = Record.Exception(() => fixture.Run()); // Then Assert.IsCakeException(result, "Required setting Description not specified."); }
public void Should_Pack_If_Sufficient_Settings_Specified() { // Given var fixture = new ChocolateyPackerWithoutNuSpecFixture(); fixture.Settings.Id = "nonexisting"; fixture.Settings.Version = "1.0.0"; fixture.Settings.Description = "The description"; fixture.Settings.Authors = new[] { "Author #1", "Author #2" }; fixture.Settings.Files = new[] { new ChocolateyNuSpecContent { Source = @"tools\**" } }; // When var result = fixture.Run(); // Then Assert.Equal("pack -y --version \"1.0.0\" " + "\"/Working/nonexisting.temp.nuspec\"", result.Args); }