public CustomizableExportForm(IFile pFile)
 {
     InitializeComponent();
     _initializeDates();
     _installmentFile = (InstallmentExportFile)pFile;
     _initializeInstallmentFile();
 }
        public void TestValidateInstallmentExportFile()
        {
            InstallmentExportFile file = new InstallmentExportFile();

            try
            {
                _exportServices.ValidateFile(file);
                Assert.Fail("File Name can't be empty");
            }
            catch (OpenCbsCustomExportException e)
            {
                Assert.AreEqual(OpenCbsCustomExportExceptionEnum.FileNameIsEmpty, e.Code);
            }

            file.Name = "Export File";
            file.Extension = string.Empty;

            try
            {
                _exportServices.ValidateFile(file);
                Assert.Fail("File Extension is incorrect");
            }
            catch (OpenCbsCustomExportException e)
            {
                Assert.AreEqual(OpenCbsCustomExportExceptionEnum.FileExtensionIsIncorrect, e.Code);
            }

            file.Extension = "txt";

            try
            {
                _exportServices.ValidateFile(file);
                Assert.Fail("File Extension is incorrect");
            }
            catch (OpenCbsCustomExportException e)
            {
                Assert.AreEqual(OpenCbsCustomExportExceptionEnum.FileExtensionIsIncorrect, e.Code);
            }

            file.Extension = "*.txt";

            try
            {
                _exportServices.ValidateFile(file);
                Assert.Fail("File Extension is incorrect");
            }
            catch (OpenCbsCustomExportException e)
            {
                Assert.AreEqual(OpenCbsCustomExportExceptionEnum.FileExtensionIsIncorrect, e.Code);
            }

            file.Extension = ".txt";
            Assert.AreEqual(true, _exportServices.ValidateFile(file));
        }