public void DeliversHQInParallel()
        {
            using (var dir = new TempDirectory())
            {
                var hive = new FileHive(dir.Value().FullName, "product");

                Parallel.For(0, Environment.ProcessorCount << 4, i =>
                        {
                        var xoc = hive.HQ().Xocument("test");
                        xoc.Modify(
                            new Directives()
                            .Xpath("/test")
                            .AddIf("result")
                            .Set("passed")
                            );
                        Assert.Equal(
                            "passed",
                            hive.HQ().Xocument("test").Value("/test/result/text()", "")
                            );
                    });
            }
        }
Beispiel #2
0
 public void WorksWithFileHive()
 {
     using (var dir = new TempDirectory())
     {
         var valve = new LocalSyncPipe();
         var hive  = new FileHive(dir.Value().FullName, "product");
         hive.Catalog().Add("2CV");
         Parallel.For(0, Environment.ProcessorCount << 4, i =>
                 {
                 hive.Comb("2CV");
                 hive.Scope();
                 hive.HQ();
             });
     }
 }