public void ScriptProviderHelper_GetFileSystemScriptOptions_ShouldSetIncludeSubDirectoriesToFalse_IfSubFoldersIsSetToFalse()
        {
            var batch = new ScriptBatch("", true, subFolders: false, 5, Constants.Default.Encoding);

            ScriptProviderHelper.GetFileSystemScriptOptions(batch, NamingOptions.Default).Match(
                some: options => options.IncludeSubDirectories.Should().BeFalse(),
                none: error => Assert.Fail(error.Message)
                );
        }
Exemplo n.º 2
0
        public void ScriptProviderHelper_WhenOptionIsSpecified_ShouldReturnValid_Prefix_Option()
        {
            var batch = new ScriptBatch("", true, subFolders: true, 5, Constants.Default.Encoding);

            var naminOptions = new NamingOptions(false, false, "customprefix");

            ScriptProviderHelper.GetFileSystemScriptOptions(batch, naminOptions).Match(
                some: options => options.Prefix.Should().Be("customprefix"),
                none: error => Assert.Fail(error.Message)
                );
        }
Exemplo n.º 3
0
        public void ScriptProviderHelper_WhenOptionIsSpecified_ShouldReturnValid_PrefixScriptNameWithBaseFolderName_Option()
        {
            var batch = new ScriptBatch("", true, subFolders: true, 5, Constants.Default.Encoding);

            var naminOptions = new NamingOptions(false, includeBaseFolderName: true, null);

            ScriptProviderHelper.GetFileSystemScriptOptions(batch, naminOptions).Match(
                some: options => options.PrefixScriptNameWithBaseFolderName.Should().BeTrue(),
                none: error => Assert.Fail(error.Message)
                );
        }