Exemplo n.º 1
0
 public void ParseAndCountIndexTest()
 {
     TestLauncherActor.Test(() =>
     {
         var router = new IndexRouter();
         var folder = new DataFolder(source);
         folder.Parse(router, Functer.RimeFuncter);
         var query  = new QueryByIndex("Word");
         var future = new Future <string, IEnumerable <Field> >();
         query.Launch(future, router);
         Task.Delay(5000).Wait();
         var result = future.Result();
         Assert.AreEqual(3, result.Item2.Count());
     });
 }
Exemplo n.º 2
0
 public void LaunchWithReturnValueTest()
 {
     TestLauncherActor.Test(() =>
     {
         var router = new IndexRouter();
         var folder = new DataFolder(source);
         folder.Parse(router, Functer.RimeFuncter);
         var query   = new QueryByIndex("Word");
         var results = query.Launch(router);
         Task.Delay(5000).Wait();
         foreach (var item in results)
         {
             Assert.AreEqual("Word", item.FieldName);
         }
     });
 }