Amido.PreProcessor.Cmd.Tests.TokenisationRunnerTests.TestProcessSingleTemplate_WithValidPropertiesWithoutOverrides C# (CSharp) Метод

TestProcessSingleTemplate_WithValidPropertiesWithoutOverrides() приватный Метод

private TestProcessSingleTemplate_WithValidPropertiesWithoutOverrides ( ) : void
Результат void
        public void TestProcessSingleTemplate_WithValidPropertiesWithoutOverrides()
        {
            const string template = "some tokenised <%token1%> text.";
            const string processedTemplate = "some tokenised value1 text.";

            var properties = new Dictionary<string, string>();
            properties.Add("token1", "value1");
            IList<string> tokensNotFound = new List<string>();

            this.mockTokeniser.Setup(x => x.TryReplace(sourceFile, properties, out tokensNotFound)).Returns(sourceFile);
            this.mockTokeniser.Setup(x => x.TryReplace(destFile, properties, out tokensNotFound)).Returns(destFile);

            this.mockFSO.Setup(x => x.FileExists(sourceFile)).Returns(true);
            
            this.mockFSO.Setup(x => x.ReadAllText(sourceFile)).Returns(template);

            this.mockTokeniser.Setup(x => x.TryReplace(template, properties, out tokensNotFound)).Returns(processedTemplate);

            this.mockFSO.Setup(x => x.GetDirectoryFullPath(destFile)).Returns(destDir);
            this.mockFSO.Setup(x => x.DirectoryExists(destDir)).Returns(true);

            this.mockFSO.Setup(x => x.WriteAllText(destFile, processedTemplate));

            this.tokenisationRunner.ProcessSingleTemplate(properties, sourceFile, destFile);
        }