public void ToFile_Should_Save_File_With_Format_Specified() {
            
            var expression = new OutputExpression();
            expression.ToFile(fileName1).UsingFormat(OutputFormat.GIF);

            Assert.AreEqual(expression.OutputParameters.Count, 1);

            var outputParameter = expression.OutputParameters[0];

            Assert.AreEqual(outputParameter.Format, OutputFormat.GIF);
            Assert.AreEqual(outputParameter.OutputFile.FileName, fileName1);
        }
        public void ToFile_Preserves_Multiple_Files() {
            var expression = new OutputExpression();
            expression.ToFile(fileName1).UsingFormat(OutputFormat.GIF);
            expression.ToFile(fileName2).UsingFormat(OutputFormat.ClientSideImageMap);

            Assert.AreEqual(expression.OutputParameters.Count, 2);

            var outputParameter = expression.OutputParameters[0];

            Assert.AreEqual(outputParameter.Format, OutputFormat.GIF);
            Assert.AreEqual(outputParameter.OutputFile.FileName, fileName1);

            outputParameter = expression.OutputParameters[1];

            Assert.AreEqual(outputParameter.Format, OutputFormat.ClientSideImageMap);
            Assert.AreEqual(outputParameter.OutputFile.FileName, fileName2);
        }
        public void ToFile_Should_Save_File_With_Default_Format_If_Not_Specified()
        {
            var configurationProvider = MockRepository.GenerateMock<IConfigurationProvider>();
            configurationProvider.Expect(x => x.DefaultFileFormat).Return(OutputFormat.Canon);

            var expression = new OutputExpression(configurationProvider);
            expression.ToFile(fileName1);

            configurationProvider.VerifyAllExpectations();

            Assert.AreEqual(expression.OutputParameters.Count, 1);

            var outputParameter = expression.OutputParameters[0];

            Assert.AreEqual(outputParameter.Format, OutputFormat.Canon);
            Assert.AreEqual(outputParameter.OutputFile.FileName, fileName1);
        }