Java | .Net |
---|---|
java.util.Hashtable getRecognitionProperties() | System.Collections.Hashtable GetRecognitionProperties() |
int getRecognitionPropertyWeight(String propertyName) | int GetRecognitionPropertyWeight(String propertyName) |
다음 Java™ 샘플에서는 새 특성 ".priorLabel"을 추가 인식 특성으로 추가합니다.
import com.rational.test.ft.domain.*; public class someProxy extends baseProxy { . . public java.util.Hashtable getRecognitionProperties() { java.util.Hashtable properties = super.getRecognitionProperties(); properties.put(".priorLabel", getPriorLabel()); return properties; } . . . public Object getRecognitionPropertyWeight(String propertyName) { if (propertyName.equals(".priorLabel")) return 60; return super.getRecognitionPropertyWeight(propertyName); } }
다음 .Net 샘플에서는 새 특성 ".priorLabel"을 추가 인식 특성으로 추가합니다.
using Rational.Test.Ft.Domain; public class AnyProxy:BaseProxy { . . . public override System.Collections.Hashtable GetRecognitionProperties() { System.Collections.Hashtable properties= base.GetRecognitionProperties(); properties.Add(".priorLabel", GetPriorLabel() ); return properties; } . . . public override object GetRecognitionPropertyWeight(string propertyName) { if (propertyName == ".priorLabel" ) return 60; return base.GetRecognitionPropertyWeight(propertyName) ; }