示例#1
0
        public void ShouldThrowIfOutputPackageIsNull()
        {
            // Given
            var fixture = new AppEncrypterFixture()
            {
                InputPackage = "test.appx"
            };

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

            // Then
            result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("outputPackage");
        }
示例#2
0
        public void ShouldThrowIfOutputPackageIsNull()
        {
            // Given
            var fixture = new AppEncrypterFixture()
            {
                InputPackage = "test.appx"
            };

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

            // Then
            Assert.IsType <ArgumentNullException>(result);
            Assert.Equal("outputPackage", ((ArgumentNullException)result).ParamName);
        }
示例#3
0
        public void ShouldThrowIfAppPackerExecutableWasNotFound()
        {
            //InputPackage, OutputPackage, KeyFile, Settings
            // Given
            var fixture = new AppEncrypterFixture()
            {
                InputPackage = "test.appx", OutputPackage = "test.appx"
            };

            fixture.GivenDefaultToolDoNotExist();

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

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