public void ShouldThrowIfContentDirectoryIsNull() { // Given var fixture = new AppPackerFixture() { OutputPackage = "test.appx" }; // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("contentDirectory"); }
public void ShouldThrowIfOutputPackageIsNull() { // Given var fixture = new AppPackerFixture() { ContentDirectory = "content" }; // When var result = Record.Exception(() => fixture.Run()); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("outputPackage", ((ArgumentNullException)result).ParamName); }
public void ShouldThrowIfAppPackerExecutableWasNotFound() { // Given var fixture = new AppPackerFixture() { OutputPackage = "test.appx", ContentDirectory = "content" }; fixture.GivenDefaultToolDoNotExist(); // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <CakeException>(); result.Message.ShouldEqual("App Packager: Could not locate executable."); }