public void ShouldThrowIfAppPackagerCannotBeResolved() { // Given var fixture = new AppPackagerResolverFixture(); // When var result = Record.Exception(() => fixture.Resolve()); // Then result.ShouldBeType <CakeException>().Message.ShouldContain("Failed to find MakeAppx.exe."); }
public void ShouldThrowIfAppPackagerCannotBeResolved() { // Given var fixture = new AppPackagerResolverFixture(); // When var result = Record.Exception(() => fixture.Resolve()); // Then Assert.IsType <CakeException>(result); Assert.Equal("Failed to find MakeAppx.exe.", result.Message); }
public void ShouldThrowIfNotFoundOnDiscAndSdkRegistryPathCannotBeResolved() { // Given var fixture = new AppPackagerResolverFixture(); fixture.GivenThatNoSdkRegistryKeyExist(); // When var result = Record.Exception(() => fixture.Resolve()); // Then result.ShouldBeType <CakeException>().Message.ShouldContain("Failed to find MakeAppx.exe."); }
public void ShouldReturnFromRegistryIfFound() { // Given var fixture = new AppPackagerResolverFixture(); fixture.GivenThatToolHasRegistryKey(); // When var result = fixture.Resolve(); // Then result.ShouldNotBeNull(); }
public void ShouldReturnFromDiscIfFound(bool is64Bit) { // Given var fixture = new AppPackagerResolverFixture(is64Bit); fixture.GivenThatToolExistInKnownPath(); // When var result = fixture.Resolve(); // Then result.ShouldNotBeNull(); }
public void ShouldThrowIfToolsIsNull() { // Given var fixture = new AppPackagerResolverFixture(); fixture.Tools = null; // When var result = Record.Exception(() => fixture.Resolve()); // Then result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("tools"); }
public void ShouldThrowIfToolsIsNull() { // Given var fixture = new AppPackagerResolverFixture(); fixture.Tools = null; // When var result = Record.Exception(() => fixture.Resolve()); // Then Assert.IsType <ArgumentNullException>(result); Assert.Equal("tools", ((ArgumentNullException)result).ParamName); }