public void GetTheExtensionForASpecificFileType()
        {
            var importType = FileType.Report;
            var extension  = FileAttributeUtility.GetExtensionType(importType);

            Assert.AreEqual(@".rep", extension);
        }
        public void GetAllAvailableImportFiles()
        {
            var availableFiles = FileAttributeUtility.GetAllFileDefinitions <FileType>(true);

            Assert.IsNotNull(availableFiles);
            Assert.AreEqual(1, availableFiles.Count());
            Assert.AreEqual(FileType.Report.ToString(), availableFiles.First().Name);
        }
        public void GetTheFileTypeForASpecificExtension()
        {
            var extension = @".rep";
            var fileType  = FileAttributeUtility.ParseEnumFromExtension(extension, FileType.Undefined);

            Assert.AreEqual(FileType.Report, fileType);
            Assert.AreEqual(FileType.Report, fileType);
        }
        public void GetTheImportColumnDetailsForAnImportContract()
        {
            var headerContract          = FileType.Report.GetHeaderContract();
            var headerColumnDefinitions = FileAttributeUtility.GetImportColumnsDetails(headerContract);

            Assert.IsNotNull(headerColumnDefinitions);
            Assert.AreEqual(1, headerColumnDefinitions.Count());
            Assert.AreEqual(0, headerColumnDefinitions.First().Position);
            Assert.AreEqual(true, headerColumnDefinitions.First().IsRequired);
        }