Example #1
0
        public void ShouldThrowIfContentDirectoryIsNull()
        {
            // Given
            var fixture = new AppBundlerFixture()
            {
                OutputBundle = "test.appx"
            };

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

            // Then
            result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("contentDirectory");
        }
Example #2
0
        public void ShouldThrowIfContentDirectoryIsNull()
        {
            // Given
            var fixture = new AppBundlerFixture()
            {
                OutputBundle = "test.appx"
            };

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

            // Then
            Assert.IsType <ArgumentNullException>(result);
            Assert.Equal("contentDirectory", ((ArgumentNullException)result).ParamName);
        }
Example #3
0
        public void ShouldThrowIfAppPackerExecutableWasNotFound()
        {
            // Given
            var fixture = new AppBundlerFixture()
            {
                OutputBundle = "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.");
        }