SIL.FieldWorks.FDO.FDOTests.FdoTestHelper.VerifyHyperlinkPropsAreCorrect C# (CSharp) Method

VerifyHyperlinkPropsAreCorrect() public static method

Asserts the properties of a run are set correctly to be a hyperlink for the given URL.
public static VerifyHyperlinkPropsAreCorrect ( ITsTextProps props, int expectedWs, string sUrl ) : void
props ITsTextProps The properties.
expectedWs int The expected writing system.
sUrl string The URL.
return void
		public static void VerifyHyperlinkPropsAreCorrect(ITsTextProps props, int expectedWs,
			string sUrl)
		{
			Assert.AreEqual(1, props.IntPropCount);
			int nDummy;
			Assert.AreEqual(expectedWs,
				props.GetIntPropValues((int)FwTextPropType.ktptWs, out nDummy));
			Assert.AreEqual(2, props.StrPropCount);
			Assert.AreEqual(StyleServices.Hyperlink,
				props.GetStrPropValue((int)FwTextPropType.ktptNamedStyle));
			string sObjData = props.GetStrPropValue((int)FwTextPropType.ktptObjData);
			Assert.AreEqual(Convert.ToChar((int)FwObjDataTypes.kodtExternalPathName), sObjData[0]);
			Assert.AreEqual(sUrl, sObjData.Substring(1));
		}