public void ShouldNotOverridesEmptyScriptArgs()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    ScriptArgs = new string[0]
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.ScriptArgs.ShouldBeEmpty();
            }
            public void ShouldNotOverridesEmptyReferences()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    References = new Type[0]
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.References.ShouldBeEmpty();
            }
Example #3
0
            public void ShouldNotOverridesValuedKeepScriptsSeparated()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    KeepScriptsSeparated = true
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.KeepScriptsSeparated.ShouldBeTrue();
            }
            public void ShouldNotOverridesValuedScriptArgs()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    ScriptArgs = new[] { "arg" }
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.ScriptArgs.Length.ShouldEqual(1);
                result.ScriptArgs[0].ShouldEqual("arg");
            }
            public void ShouldNotOverridesValuedReferences()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    References = new[] { typeof(OverridesNullByDefaultMethod) }
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.References.Length.ShouldEqual(1);
                result.References[0].ShouldEqual(typeof(OverridesNullByDefaultMethod));
            }
            public void ShouldOverridesNullFileSystem()
            {
                // arrange
                var options = new ScriptCsCatalogOptions {
                    FileSystem = null
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.FileSystem.ShouldNotBeNull();
                result.FileSystem.ShouldBeType <FileSystem>();
            }
            public void ShouldNotOverridesValuedFileSystem()
            {
                // arrange
                var fileSystemMock = new Mock <IFileSystem>().Object;
                var options        = new ScriptCsCatalogOptions {
                    FileSystem = fileSystemMock
                };

                // act
                var result = options.OverridesNullByDefault();

                // assert
                result.FileSystem.ShouldNotBeNull();
                result.FileSystem.ShouldEqual(fileSystemMock);
            }