コード例 #1
0
        public void ShouldNotAutoGenerateSpecifiedTaggedValues()
        {
            ICctsRepository ccRepository = CctsRepositoryFactory.CreateCctsRepository(new CdtLibraryTestRepository());
            ICdtLibrary     cdtLibrary   = ccRepository.GetCdtLibraryByPath(CdtLibraryTestRepository.PathToCdtLibrary());

            ICdt cdtText = ccRepository.GetCdtByPath(CdtLibraryTestRepository.PathToCdtText());

            CdtSpec cdtSpec = CdtSpec.CloneCdt(cdtText);

            cdtSpec.DictionaryEntryName = "cdt1";
            cdtSpec.UniqueIdentifier    = "{1-2-3}";

            ICdt updatedCdt = cdtLibrary.UpdateCdt(cdtText, cdtSpec);

            Assert.That(updatedCdt.UniqueIdentifier, Is.EqualTo("{1-2-3}"));
            Assert.That(updatedCdt.DictionaryEntryName, Is.EqualTo("cdt1"));
        }
コード例 #2
0
        public void ShouldNotUpdateAutoGeneratedTaggedValues()
        {
            ICctsRepository ccRepository = CreateRepository();
            ICdtLibrary     cdtLibrary   = ccRepository.GetCdtLibraryByPath(CdtLibraryTestRepository.PathToCdtLibrary());

            ICdt   cdtText = ccRepository.GetCdtByPath(CdtLibraryTestRepository.PathToCdtText());
            string cdtTextUniqueIdentifier    = cdtText.UniqueIdentifier;
            string cdtTextDictionaryEntryName = cdtText.DictionaryEntryName;

            CdtSpec cdtSpec = CdtSpec.CloneCdt(cdtText);

            cdtSpec.Name = "cdt1";

            ICdt updatedCdt = cdtLibrary.UpdateCdt(cdtText, cdtSpec);

            Assert.That(updatedCdt.UniqueIdentifier, Is.EqualTo(cdtTextUniqueIdentifier));
            Assert.That(updatedCdt.DictionaryEntryName, Is.EqualTo(cdtTextDictionaryEntryName));
        }