Amido.PreProcessor.Cmd.Tests.TokenisationRunnerTests.TestProcessSingleTemplate_WithTemplateFileNotFound_ExpectException C# (CSharp) Method

TestProcessSingleTemplate_WithTemplateFileNotFound_ExpectException() private method

        public void TestProcessSingleTemplate_WithTemplateFileNotFound_ExpectException()
        {
            var properties = new Dictionary<string, string>();
            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(false);

            try
            {
                this.tokenisationRunner.ProcessSingleTemplate(properties, sourceFile, destFile);
            }
            catch (InvalidOperationException ex)
            {
                Assert.AreEqual(string.Format("Error occurred while processing template {0} and destination file {1}.  Please refer to inner exception for details.", sourceFile, destFile), ex.Message);
            }
        }