Ejemplo n.º 1
0
 /// <summary>
 /// Make one.
 /// </summary>
 /// <param name="wrappedFragId"></param>
 /// <param name="creator"></param>
 /// <param name="paraStyle"></param>
 /// <param name="before"></param>
 /// <param name="listDelimitNode"></param>
 /// <param name="number"></param>
 /// <param name="delayNumber"></param>
 /// <param name="xaNum"></param>
 /// <param name="ttpNum"></param>
 public WrapParagraphDisplayCommand(int wrappedFragId, XmlVcDisplayVec creator, string paraStyle, ITsString before, XmlNode listDelimitNode,
                                    bool number, bool delayNumber, XmlAttribute xaNum, ITsTextProps ttpNum)
 {
     WrappedFragId     = wrappedFragId;
     m_creator         = creator;
     m_paraStyle       = paraStyle;
     m_tssBefore       = before;
     m_listDelimitNode = listDelimitNode;
     m_numberItems     = number;
     m_delayNumber     = delayNumber;
     m_xaNum           = xaNum;
     m_ttpNum          = ttpNum;
 }
Ejemplo n.º 2
0
			/// <summary>
			/// Make one.
			/// </summary>
			/// <param name="wrappedFragId"></param>
			/// <param name="creator"></param>
			/// <param name="paraStyle"></param>
			/// <param name="before"></param>
			/// <param name="listDelimitNode"></param>
			/// <param name="number"></param>
			/// <param name="delayNumber"></param>
			/// <param name="xaNum"></param>
			/// <param name="ttpNum"></param>
			public WrapParagraphDisplayCommand(int wrappedFragId, XmlVcDisplayVec creator, string paraStyle, ITsString before, XmlNode listDelimitNode,
				bool number, bool delayNumber, XmlAttribute xaNum, ITsTextProps ttpNum)
			{
				WrappedFragId = wrappedFragId;
				m_creator = creator;
				m_paraStyle = paraStyle;
				m_tssBefore = before;
				m_listDelimitNode = listDelimitNode;
				m_numberItems = number;
				m_delayNumber = delayNumber;
				m_xaNum = xaNum;
				m_ttpNum = ttpNum;
			}
Ejemplo n.º 3
0
		public void SenseOutlineIsObtainedUsingVirtual()
		{
			// For this test we need a real entry and sense.
			var entry = Cache.ServiceLocator.GetInstance<ILexEntryFactory>().Create();
			var sense = Cache.ServiceLocator.GetInstance<ILexSenseFactory>().Create();
			entry.SensesOS.Add(sense);
			var sda = new MockDecorator(Cache);
			var vc = new XmlVc(null, "root", true, null, null, sda);
			vc.SetCache(Cache);
			var sut = new XmlVcDisplayVec(vc, new MockEnv(), entry.Hvo, LexEntryTags.kflidSenses, 1);

			Assert.That(sut.CalculateAndFormatSenseLabel(sense.Hvo, 0, "%O)"), Is.EqualTo("77)"),
				"CalculateAndFormatSenseLabel should have used the decorator method");
			Assert.That(sda.Tag, Is.EqualTo(Cache.MetaDataCacheAccessor.GetFieldId2(LexSenseTags.kClassId, "LexSenseOutline", false)),
				"CalculateAndFormatSenseLabel should have used the right property");
		}