Exemplo n.º 1
0
        public void HandlerSupportsCorrectExtensions()
        {
            var extensions         = _imageFileHandler.GetExtensionsOfKnownTextFileTypes().ToList();
            var expectedExtensions = new HashSet <string> {
                "bmp", "jpg", "jpeg", "gif", "png", "tif", "tiff", "ico", "wmf", "pcx", "cgm"
            };

            Assert.AreEqual(expectedExtensions.Count, extensions.Count);
            foreach (var expectedExtension in expectedExtensions)
            {
                Assert.Contains(expectedExtension, extensions);
            }
        }
Exemplo n.º 2
0
        public void HandlerSupportsCorrectExtensions()
        {
            var extensions = _audioFileHandler.GetExtensionsOfKnownTextFileTypes().ToList();

            Assert.IsTrue(extensions.Count() == 8);
            var expectedExtensions = new HashSet <string> {
                "wav", "snd", "au", "aif", "aifc", "aiff", "wma", "mp3"
            };

            foreach (var expectedExtension in expectedExtensions)
            {
                Assert.Contains(expectedExtension, extensions);
            }
        }
Exemplo n.º 3
0
        public void HandlerOnlySupportsUserLexiconSettingsExtension()
        {
            var extensions = _userLexiconSettingsFileHandler.GetExtensionsOfKnownTextFileTypes();

            Assert.That(extensions.Count(), Is.EqualTo(1));
            Assert.AreEqual("ulsx", extensions.First());
        }
        public void GetExtensionsOfKnownTextFileTypesIsChorusNotes()
        {
            var extensions = _chorusNotesFileHandler.GetExtensionsOfKnownTextFileTypes().ToArray();

            Assert.AreEqual(1, extensions.Count(), "Wrong number of extensions.");
            Assert.AreEqual(AnnotationRepository.FileExtension, extensions[0]);
        }
Exemplo n.º 5
0
        public void GetExtensionsOfKnownTextFileTypesIsLiftRanges()
        {
            var extensions = _liftRangesFileHandler.GetExtensionsOfKnownTextFileTypes().ToArray();

            Assert.AreEqual(1, extensions.Count(), "Wrong number of extensions.");
            Assert.AreEqual("lift-ranges", extensions[0]);
        }
Exemplo n.º 6
0
        public void HandlerOnlySupportsldmlExtension()
        {
            var extensions = _ldmlFileHandler.GetExtensionsOfKnownTextFileTypes();

            Assert.IsTrue(extensions.Count() == 1);
            Assert.AreEqual("ldml", extensions.First());
        }
        public void HandlerOnlySupportsProjectLexiconSettingsExtension()
        {
            var extensions = _projectLexiconSettingsFileHandler.GetExtensionsOfKnownTextFileTypes();

            Assert.That(extensions.Count(), Is.EqualTo(1));
            Assert.That(extensions.First(), Is.EqualTo("plsx"));
        }
        public void HandlerOnlySupportsProjectLexiconSettingsExtension()
        {
            var extensions = _projectLexiconSettingsFileHandler.GetExtensionsOfKnownTextFileTypes();

            Assert.IsTrue(extensions.Count() == 1);
            Assert.AreEqual("plsx", extensions.First());
        }
Exemplo n.º 9
0
        public void EnsureAllSupportedExtensionsAreReturned()
        {
            var supportedExtensions = new HashSet <string>
            {
                // Common
                SharedConstants.ModelVersion,                           // 'ModelVersion' Better validation done.
                SharedConstants.CustomProperties,                       // 'CustomProperties' Better validation done.
                SharedConstants.Style,                                  // 'style'
                SharedConstants.List,                                   // 'list'

                // General
                SharedConstants.langproj,                                       // 'langproj'
                SharedConstants.Annotation,                                     // 'annotation'
                SharedConstants.Filter,                                         // 'filter'
                SharedConstants.orderings,                                      // 'orderings'
                SharedConstants.pictures,                                       // 'pictures'

                // Scripture
                SharedConstants.ArchivedDraft,                          // 'ArchivedDraft'
                SharedConstants.ImportSetting,                          // 'ImportSetting'
                SharedConstants.Srs,                                    // 'srs'
                SharedConstants.Trans,                                  // 'trans'
                SharedConstants.bookannotations,                        // 'bookannotations'
                SharedConstants.book,                                   // 'book'

                // Anthropology
                SharedConstants.Ntbk,                                           // 'ntbk'

                // Linguistics
                SharedConstants.Reversal,                               // 'reversal'
                SharedConstants.Lexdb,                                  // 'lexdb' The lexicon only added one new extension "lexdb", as the lists are already taken care of.
                SharedConstants.TextInCorpus,                           // 'textincorpus' Text corpus only added one new extension "textincorpus", as the list is already taken care of.
                SharedConstants.Inventory,                              // 'inventory' inventory
                SharedConstants.DiscourseExt,                           // 'discourse' discourse
                SharedConstants.Featsys,                                // 'featsys' Feature structure systems (Phon and Morph & Syn)
                SharedConstants.Phondata,                               // 'phondata'
                SharedConstants.Morphdata,                              // 'morphdata'
                SharedConstants.Agents,                                 // 'agents'

                // FW layouts
                SharedConstants.fwlayout,                               // 'fwlayout'
                SharedConstants.fwdictconfig                            // 'fwdictconfig'
            };

            var knownExtensions = new HashSet <string>(_commonHandler.GetExtensionsOfKnownTextFileTypes());

            Assert.IsTrue(knownExtensions.SetEquals(supportedExtensions));
        }
Exemplo n.º 10
0
        public void HandlerSupportsCorrectExtensions()
        {
            var extensions = _defaultFileHandler.GetExtensionsOfKnownTextFileTypes().ToList();

            Assert.IsTrue(extensions.Count == 0);
        }
Exemplo n.º 11
0
        public void HandlerSupportsCorrectExtensions()
        {
            var extensions = _defaultFileHandler.GetExtensionsOfKnownTextFileTypes().ToList();

            Assert.That(extensions.Count, Is.EqualTo(0));
        }