public void TestCreateFromConstructor()
 {
     this.classifier = new BackToBackPatternClassifier<string, string>(
         new PatternMatchingClassifier<string>(new Dictionary<string, string> { { "oof", "bucket" } }),
         new PatternMatchingClassifier<string>(this.map));
     Assert.AreEqual("spam", this.classifier.Classify("oof"));
 }
 public void CreateMap()
 {
     this.classifier  = new BackToBackPatternClassifier<string, string>();
     this.map = new Dictionary<string, string>();
     this.map.Add("foo", "bar");
     this.map.Add("*", "spam");
 }
コード例 #3
0
 public void CreateMap()
 {
     this.classifier = new BackToBackPatternClassifier <string, string>();
     this.map        = new Dictionary <string, string>();
     this.map.Add("foo", "bar");
     this.map.Add("*", "spam");
 }
コード例 #4
0
 public void TestCreateFromConstructor()
 {
     this.classifier = new BackToBackPatternClassifier <string, string>(
         new PatternMatchingClassifier <string>(new Dictionary <string, string> {
         { "oof", "bucket" }
     }),
         new PatternMatchingClassifier <string>(this.map));
     Assert.AreEqual("spam", this.classifier.Classify("oof"));
 }