Exemplo n.º 1
0
        public void ServerBasedTrados2007TranslationMemory_Constructor_OpensExisting()
        {
            string serverAdress = "VQ01EN-S3E-08";
            string tmName       = "General04_ENus_DEde";
            string container    = "2007_TMSERVER_TMC2";
            string userName     = @"Andy";
            string password     = @"Andy";
            TranslationMemoryAccessMode acessMode = TranslationMemoryAccessMode.Maintenance;

            var target = new ServerBasedTrados2007TranslationMemory(serverAdress, tmName, container, userName, password, acessMode);

            Assert.IsNotNull(target);
            Assert.IsTrue(target.IsReadOnly);
            Assert.AreEqual(new LanguagePair("en-US", "de-DE"), target.LanguageDirection);
            Assert.AreEqual("SDL Trados 2007 General04_ENus_DEde", target.Name);
            Assert.IsTrue(target.SupportsConcordanceSearch);
            Assert.IsTrue(target.SupportsDocumentSearches);
            Assert.IsTrue(target.SupportsFilters);
            Assert.IsTrue(target.SupportsFuzzySearch);
            Assert.IsTrue(target.SupportsMultipleResults);
            Assert.IsTrue(target.SupportsPenalties);
            Assert.IsTrue(target.SupportsPlaceables);
            Assert.IsTrue(target.SupportsScoring);
            Assert.IsTrue(target.SupportsSearchForTranslationUnits);
            Assert.IsTrue(target.SupportsSourceConcordanceSearch);
            Assert.IsTrue(target.SupportsStructureContext);
            Assert.IsTrue(target.SupportsTaggedInput);
            Assert.IsFalse(target.SupportsTargetConcordanceSearch);
            Assert.IsTrue(target.SupportsTranslation);
            Assert.IsFalse(target.SupportsUpdate);
            Assert.IsTrue(target.SupportsWordCounts);
            Assert.AreEqual(TranslationMethod.TranslationMemory, target.TranslationMethod);
            Assert.IsTrue(target.SupportsLanguageDirection(new LanguagePair("en-US", "de-DE")));
            Assert.IsNotNull(target.Uri);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Checks the server for inconsistencies. Theoretically, will throw exceptions if connection was unsuccessful.
        /// </summary>
        /// <param name="memory">The server-based translation memory.</param>
        /// <returns>
        ///   <c>true</c> if connection was succesfully established; otherwise - <c>false</c>
        /// </returns>
        private bool CheckServer(ServerBasedTrados2007TranslationMemory memory)
        {
            var langdir = memory.LanguageDirection;

            return(memory.SupportsLanguageDirection(langdir));
        }