Exemple #1
0
 private AccessSafely(AccessSafely existing, int happenings)
 {
     totalWrites = existing.totalWrites;
     until       = TestUntil.Happenings(happenings);
     biConsumers = existing.biConsumers;
     consumers   = existing.consumers;
     functions   = existing.functions;
     suppliers   = existing.suppliers;
     @lock       = new object();
 }
Exemple #2
0
 public TestContext(int times)
 {
     Access    = AccessSafely.AfterCompleting(times);
     reference = new AtomicReference <object>();
     SetUpWriteRead();
 }
 /// <summary>
 /// Answer a myself with with a new expected completions/happenings <paramref name="times"/>.
 /// </summary>
 /// <param name="times">The number of expected completions.</param>
 /// <returns></returns>
 public virtual TestContext ResetAfterCompletingTo(int times)
 {
     Access = Access.ResetAfterCompletingTo(times);
     return(this);
 }