Пример #1
0
        public void ShouldThrowIfOutputDirectoryIsNull()
        {
            // Given
            var fixture = new AppUnbundlerFixture()
            {
                InputBundle = "test.appx"
            };

            // When
            var result = Record.Exception(() => fixture.Run());

            // Then
            result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("outputDirectory");
        }
        public void ShouldThrowIfInputPackageIsNull()
        {
            // Given
            var fixture = new AppUnbundlerFixture()
            {
                OutputDirectory = "output"
            };

            // When
            var result = Record.Exception(() => fixture.Run());

            // Then
            Assert.IsType <ArgumentNullException>(result);
            Assert.Equal("inputBundle", ((ArgumentNullException)result).ParamName);
        }
Пример #3
0
        public void ShouldThrowIfAppUnbundlerExecutableWasNotFound()
        {
            // Given
            var fixture = new AppUnbundlerFixture()
            {
                InputBundle = "test.appx", OutputDirectory = "output"
            };

            fixture.GivenDefaultToolDoNotExist();

            // When
            var result = Record.Exception(() => fixture.Run());

            // Then
            result.ShouldBeType <CakeException>();
            result.Message.ShouldEqual("App Packager: Could not locate executable.");
        }