Ejemplo n.º 1
0
        public void PasteIntoMultiStringFieldDoesNotFlattenWsStyle()
        {
            var args = new FwPasteFixTssEventArgs(m_tss, new TextSelInfo((IVwSelection)null));

            // Veryify that we are testing  with a field of the correct type (if this fails the model changed)
            Assert.AreEqual((int)CellarPropertyType.MultiString, Cache.MetaDataCacheAccessor.GetFieldType(LexSenseTags.kflidGeneralNote));
            //SUT
            InnerLabeledMultiStringView.EliminateExtraStyleAndWsInfo(Cache.MetaDataCacheAccessor, args, LexSenseTags.kflidGeneralNote);
            string differences;

            Assert.True(TsStringHelper.TsStringsAreEqual(m_tss, args.TsString, out differences), differences);
        }
Ejemplo n.º 2
0
        public void PasteIntoMultiUnicodeFieldFlattensWsStyle()
        {
            var args = new FwPasteFixTssEventArgs(m_tss, new TextSelInfo((IVwSelection)null));

            // Veryify that we are testing  with a field of the correct type (if this fails the model changed)
            Assert.AreEqual((int)CellarPropertyType.MultiUnicode, Cache.MetaDataCacheAccessor.GetFieldType(LexEntryTags.kflidCitationForm));
            //SUT
            InnerLabeledMultiStringView.EliminateExtraStyleAndWsInfo(Cache.MetaDataCacheAccessor, args, LexEntryTags.kflidCitationForm);
            string differences;

            Assert.False(TsStringHelper.TsStringsAreEqual(m_tss, args.TsString, out differences), differences);
            Assert.That(differences, Is.StringContaining("TsStrings have different number of runs"));
        }