private async Task CheckReport(Guid grainId, int perpareCount, int abortCount, int commitCount)
        {
            var resultGrain = this.grainFactory.GetGrain <ITransactionOrchestrationResultGrain>(grainId);

            TransactionOrchestrationResult results = await resultGrain.GetResults();

            Assert.Equal(perpareCount, results.Prepared.Count);
            Assert.Equal(abortCount, results.Aborted.Count);
            Assert.Equal(commitCount, results.Committed.Count);
        }
        private async Task <bool> CheckReport(Guid grainId, int perpareCount, int abortCount, bool assert)
        {
            var resultGrain = this.grainFactory.GetGrain <ITransactionOrchestrationResultGrain>(grainId);

            TransactionOrchestrationResult results = await resultGrain.GetResults();

            if (assert)
            {
                Assert.Equal(perpareCount, results.Prepared.Count);
                Assert.Equal(abortCount, results.Aborted.Count);
                Assert.Equal(results.Prepared.Max(), results.Committed.Aggregate((long)0, (t1, t2) => Math.Max(t1, t2)));
            }
            else if (perpareCount != results.Prepared.Count ||
                     abortCount != results.Aborted.Count ||
                     results.Prepared.Max() != results.Committed.Aggregate((long)0, (t1, t2) => Math.Max(t1, t2)))
            {
                return(false);
            }
            return(true);
        }