From 95f645e11eb01d1cc2792f3bd7f4e3b641ed52e7 Mon Sep 17 00:00:00 2001 From: Peter Freiling Date: Fri, 17 May 2019 15:44:53 -0700 Subject: [PATCH] Enabling SA1500, SA1511, SA1519 --- .../Aggregates/AggregateTemplates.tt | 6 +- .../Aggregates/TumblingMaxAggregate.cs | 11 +- .../CacheUtilities/StreamableIO.cs | 6 +- .../Collections/CircularBuffer.cs | 5 +- .../Collections/FastDictionary.cs | 6 +- .../Collections/FastDictionary3.cs | 3 +- .../Collections/HashHelpers.cs | 3 +- .../Collections/PooledCircularBuffer.cs | 5 +- .../Temporal/TemporalEgressObservable.cs | 44 +- .../Temporal/TemporalEgressObservable.tt | 8 +- .../Temporal/TemporalEgressTransformer.cs | 68 +- .../TemporalArrayEgressTransformer.cs | 68 +- .../Fusible/FuseModule.cs | 68 +- .../AtemporalArrayIngressSubscription.cs | 16 +- .../AtemporalArrayIngressSubscription.tt | 8 +- .../Ingress/ImpatienceSorter.cs | 19 +- .../TemporalArrayIngressSubscription.cs | 31 +- .../Operators/Afa/AfaStreamable.cs | 9 +- .../Operators/Afa/CompiledAfa.cs | 7 +- .../Operators/Afa/PatternMatcher.cs | 5 +- ...dAlterLifetimeVariableDurationByKeyPipe.cs | 13 +- .../EquiJoin/Basic/PartitionedEquiJoinPipe.cs | 7 +- .../Basic/PartitionedEquiJoinPipeCompound.cs | 7 +- .../Basic/PartitionedEquiJoinPipeSimple.cs | 11 +- .../Operators/EquiJoin/EquiJoinStreamable.cs | 11 + .../FixedIntervalEquiJoinPipe.cs | 24 +- .../PartitionedFixedIntervalEquiJoinPipe.cs | 15 +- ...tionedFixedIntervalEquiJoinPipeCompound.cs | 15 +- ...titionedFixedIntervalEquiJoinPipeSimple.cs | 19 +- .../PartitionedSessionWindowPipe.cs | 4 + .../SessionWindow/SessionWindowPipe.cs | 4 + .../Operators/Stitch/PartitionedStitchPipe.cs | 6 +- .../Operators/Stitch/StitchPipe.cs | 6 +- .../Operators/Where/MultiStringTransforms.cs | 3 +- .../StreamProperties/StreamProperties.cs | 112 +- .../StreamableAPI/AfaExtensions.cs | 6 +- .../StreamableAPI/GroupAggregateTemplate.cs | 84 +- .../StreamableAPI/GroupAggregateTemplate.tt | 6 +- .../StreamableAPI/LifetimeExtensions.cs | 4 + .../StreamableAPI/PivotExtensions.cs | 28 +- .../StringHandling/MultiString.cs | 6 + .../Transformer/SelectTransformation.cs | 6 +- .../Transformer/TemplateClasses.cs | 15 +- .../Utilities/StructTupleTemplate.cs | 3 +- .../Utilities/StructTupleTemplate.tt | 3 +- .../Utilities/TransformerExtensions.cs | 5 +- .../Utilities/TypeExtensions.cs | 7 +- Sources/Microsoft.StreamProcessing.ruleset | 6 +- Sources/Test/SimpleTesting/AdHocTests.cs | 6 +- .../DisorderedIngressAndEgressTests.cs | 768 +++++++++----- .../DisorderedIngressAndEgressTests.tt | 21 +- .../Macros/LeftOuterJoinTests.cs | 36 +- .../Macros/LeftOuterJoinTests.tt | 9 +- .../Partitioned/PartitionedStreamTests.cs | 6 +- Sources/Test/SimpleTesting/Program.cs | 10 +- Sources/Test/SimpleTesting/SimpleTests.cs | 990 ++++++++++++------ Sources/Test/SimpleTesting/SimpleTests.tt | 141 ++- Sources/Test/SimpleTesting/SnapshotTests.cs | 504 ++++++--- Sources/Test/SimpleTesting/SnapshotTests.tt | 126 ++- .../SimpleTesting/Streamables/AfaTests.cs | 59 +- .../Streamables/ExtendLifetimeTest.cs | 48 +- .../Streamables/PointAtEndTest.cs | 36 +- .../SimpleTesting/Streamables/StitchTest.cs | 78 +- 63 files changed, 2422 insertions(+), 1248 deletions(-) diff --git a/Sources/Core/Microsoft.StreamProcessing/Aggregates/AggregateTemplates.tt b/Sources/Core/Microsoft.StreamProcessing/Aggregates/AggregateTemplates.tt index 9966799..617a657 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Aggregates/AggregateTemplates.tt +++ b/Sources/Core/Microsoft.StreamProcessing/Aggregates/AggregateTemplates.tt @@ -3,7 +3,8 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Collections.Generic" #> <# -var averageTypesToGenerate = new[] { +var averageTypesToGenerate = new[] +{ new { InputTypeFriendlyName = "SByte", TypeName = "sbyte", SumTypeName = "long", ReturnTypeName = "double" }, new { InputTypeFriendlyName = "Short", TypeName = "short", SumTypeName = "long", ReturnTypeName = "double" }, new { InputTypeFriendlyName = "Int", TypeName = "int", SumTypeName = "long", ReturnTypeName = "double" }, @@ -19,7 +20,8 @@ var averageTypesToGenerate = new[] { new { InputTypeFriendlyName = "Complex", TypeName = "Complex", SumTypeName = "Complex", ReturnTypeName = "Complex" } }; -var sumTypesToGenerate = new[] { +var sumTypesToGenerate = new[] +{ new { InputTypeFriendlyName = "SByte", TypeName = "sbyte" }, new { InputTypeFriendlyName = "Byte", TypeName = "byte" }, new { InputTypeFriendlyName = "Short", TypeName = "short" }, diff --git a/Sources/Core/Microsoft.StreamProcessing/Aggregates/TumblingMaxAggregate.cs b/Sources/Core/Microsoft.StreamProcessing/Aggregates/TumblingMaxAggregate.cs index 9f17d11..7eceffa 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Aggregates/TumblingMaxAggregate.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Aggregates/TumblingMaxAggregate.cs @@ -25,10 +25,13 @@ namespace Microsoft.StreamProcessing.Aggregates public Expression>> InitialState() => () => new MinMaxState { currentTimestamp = InvalidSyncTime }; - public Expression, long, T, MinMaxState>> Accumulate() - => (state, timestamp, input) => new MinMaxState { - currentTimestamp = timestamp, - currentValue = (state.currentTimestamp == InvalidSyncTime || this.comparer(input, state.currentValue) > 0) ? input : state.currentValue }; + public Expression, long, T, MinMaxState>> Accumulate() => + (state, timestamp, input) => + new MinMaxState + { + currentTimestamp = timestamp, + currentValue = (state.currentTimestamp == InvalidSyncTime || this.comparer(input, state.currentValue) > 0) ? input : state.currentValue + }; public Expression, long, T, MinMaxState>> Deaccumulate() => (state, timestamp, input) => state; // never invoked, hence not implemented diff --git a/Sources/Core/Microsoft.StreamProcessing/CacheUtilities/StreamableIO.cs b/Sources/Core/Microsoft.StreamProcessing/CacheUtilities/StreamableIO.cs index 88c5b54..c30e420 100644 --- a/Sources/Core/Microsoft.StreamProcessing/CacheUtilities/StreamableIO.cs +++ b/Sources/Core/Microsoft.StreamProcessing/CacheUtilities/StreamableIO.cs @@ -177,10 +177,10 @@ namespace Microsoft.StreamProcessing public void Checkpoint(Stream stream) { } public void Dispose() => throw new NotImplementedException(); - public void OnCompleted() => observer.OnCompleted(); + public void OnCompleted() => this.observer.OnCompleted(); public void OnError(Exception error) => throw error; - public void OnFlush() => observer.OnNext(new QueuedMessage> { Kind = MessageKind.Flush }); - public void OnNext(StreamMessage value) => observer.OnNext(new QueuedMessage> { Kind = MessageKind.DataBatch, Message = value }); + public void OnFlush() => this.observer.OnNext(new QueuedMessage> { Kind = MessageKind.Flush }); + public void OnNext(StreamMessage value) => this.observer.OnNext(new QueuedMessage> { Kind = MessageKind.DataBatch, Message = value }); public void ProduceQueryPlan(PlanNode previous) { } public void Reset() { } public void Restore(Stream stream) { } diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/CircularBuffer.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/CircularBuffer.cs index 33ebe80..3df3415 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/CircularBuffer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/CircularBuffer.cs @@ -255,8 +255,9 @@ namespace Microsoft.StreamProcessing public IEnumerator GetEnumerator() { foreach (var buffer in this.buffers) - foreach (var item in buffer.Iterate()) - yield return item; + { + foreach (var item in buffer.Iterate()) yield return item; + } } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator(); diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary.cs index d907e27..ea73b84 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary.cs @@ -95,7 +95,8 @@ namespace Microsoft.StreamProcessing.Internal.Collections index++; if (index == this.Size) index = 0; - } while (true); + } + while (true); } /// @@ -119,7 +120,8 @@ namespace Microsoft.StreamProcessing.Internal.Collections index++; if (index == this.Size) index = 0; - } while (true); + } + while (true); } /// diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary3.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary3.cs index 596d3d6..04979f0 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary3.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/FastDictionary3.cs @@ -118,7 +118,8 @@ namespace Microsoft.StreamProcessing.Internal.Collections index++; if (index == this.Size) index = 0; - } while (true); + } + while (true); } /// diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/HashHelpers.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/HashHelpers.cs index 2e03a60..8ff3a38 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/HashHelpers.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/HashHelpers.cs @@ -87,7 +87,8 @@ namespace Microsoft.StreamProcessing.Internal.Collections internal static class HashHelpers { - public static readonly int[] primes = new int[] { + public static readonly int[] primes = new int[] + { 3, 7, 11, 0x11, 0x17, 0x1d, 0x25, 0x2f, 0x3b, 0x47, 0x59, 0x6b, 0x83, 0xa3, 0xc5, 0xef, 0x125, 0x161, 0x1af, 0x209, 0x277, 0x2f9, 0x397, 0x44f, 0x52f, 0x63d, 0x78b, 0x91d, 0xaf1, 0xd2b, 0xfd1, 0x12fd, 0x16cf, 0x1b65, 0x20e3, 0x2777, 0x2f6f, 0x38ff, 0x446f, 0x521f, 0x628d, 0x7655, 0x8e01, 0xaa6b, 0xcc89, 0xf583, 0x126a7, 0x1619b, diff --git a/Sources/Core/Microsoft.StreamProcessing/Collections/PooledCircularBuffer.cs b/Sources/Core/Microsoft.StreamProcessing/Collections/PooledCircularBuffer.cs index 02039eb..6eabcc7 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Collections/PooledCircularBuffer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Collections/PooledCircularBuffer.cs @@ -248,8 +248,9 @@ namespace Microsoft.StreamProcessing.Internal.Collections public IEnumerator GetEnumerator() { foreach (var buffer in this.buffers) - foreach (var item in buffer.Iterate()) - yield return item; + { + foreach (var item in buffer.Iterate()) yield return item; + } } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator(); diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.cs index 99593ee..af54c3c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.cs @@ -41,9 +41,11 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new StreamEventEgressPipe( - observer, - this.container); + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } @@ -114,10 +116,12 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new StartEdgeEgressPipe( - this.constructor, - observer, - this.container); + this.constructor, + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } @@ -180,10 +184,12 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new IntervalEgressPipe( - this.constructor, - observer, - this.container); + this.constructor, + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } @@ -243,9 +249,11 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new PartitionedStreamEventEgressPipe( - observer, - this.container); + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } @@ -316,10 +324,12 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new PartitionedStartEdgeEgressPipe( - this.constructor, - observer, - this.container); + this.constructor, + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } @@ -382,10 +392,12 @@ namespace Microsoft.StreamProcessing if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new PartitionedIntervalEgressPipe( - this.constructor, - observer, - this.container); + this.constructor, + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.tt b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.tt index 745fa23..f7336aa 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.tt +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressObservable.tt @@ -78,13 +78,15 @@ foreach (string ingressType in new string[] { "StreamEvent", "StartEdge", "Inter if (!Config.ForceRowBasedExecution && this.source.Properties.IsColumnar && typeof(TPayload).CanRepresentAsColumnar() && CanGenerateColumnar()) pipe = GetPipe(observer); else + { pipe = new <#= partitionString #><#= ingressType #>EgressPipe<<#= genericArguments #><#= argumentSuffix #>>( <# if (ingressType == "StartEdge" || ingressType == "Interval") { #> - this.constructor, + this.constructor, <# } #> - observer, - this.container); + observer, + this.container); + } if (this.container != null) this.container.RegisterEgressPipe(this.identifier, pipe); return this.source.Subscribe(pipe); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressTransformer.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressTransformer.cs index 4c77ced..8ebe005 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressTransformer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/Temporal/TemporalEgressTransformer.cs @@ -99,12 +99,15 @@ namespace Microsoft.StreamProcessing { var template = new TemporalEgressTemplate(typeof(Empty), typeof(TPayload), typeof(TResult), string.Empty, "StartEdge", startEdgeObservable.source.Properties.IsColumnar); if (startEdgeObservable.constructor != null) - template.startEdgeFunction = (x, y) => startEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { startEdgeObservable.constructor.Parameters[0], x }, - { startEdgeObservable.constructor.Parameters[1], y }, - }); + { + template.startEdgeFunction = (x, y) => + startEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { startEdgeObservable.constructor.Parameters[0], x }, + { startEdgeObservable.constructor.Parameters[1], y }, + }); + } var keyType = typeof(Empty); var expandedCode = template.TransformText(); @@ -133,13 +136,16 @@ namespace Microsoft.StreamProcessing { var template = new TemporalEgressTemplate(typeof(Empty), typeof(TPayload), typeof(TResult), string.Empty, "Interval", intervalObservable.source.Properties.IsColumnar); if (intervalObservable.constructor != null) - template.intervalFunction = (x, y, z) => intervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { intervalObservable.constructor.Parameters[0], x }, - { intervalObservable.constructor.Parameters[1], y }, - { intervalObservable.constructor.Parameters[2], z }, - }); + { + template.intervalFunction = (x, y, z) => + intervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { intervalObservable.constructor.Parameters[0], x }, + { intervalObservable.constructor.Parameters[1], y }, + { intervalObservable.constructor.Parameters[2], z }, + }); + } var keyType = typeof(Empty); var expandedCode = template.TransformText(); @@ -196,13 +202,16 @@ namespace Microsoft.StreamProcessing { var template = new TemporalEgressTemplate(typeof(TKey), typeof(TPayload), typeof(TResult), "Partitioned", "StartEdge", partitionedStartEdgeObservable.source.Properties.IsColumnar); if (partitionedStartEdgeObservable.constructor != null) - template.startEdgeFunction = (x, y) => partitionedStartEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { partitionedStartEdgeObservable.constructor.Parameters[0], "colkey[i].Key" }, - { partitionedStartEdgeObservable.constructor.Parameters[0], x }, - { partitionedStartEdgeObservable.constructor.Parameters[1], y }, - }); + { + template.startEdgeFunction = (x, y) => + partitionedStartEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { partitionedStartEdgeObservable.constructor.Parameters[0], "colkey[i].Key" }, + { partitionedStartEdgeObservable.constructor.Parameters[0], x }, + { partitionedStartEdgeObservable.constructor.Parameters[1], y }, + }); + } var keyType = typeof(PartitionKey<>).MakeGenericType(typeof(TKey)); var expandedCode = template.TransformText(); @@ -231,14 +240,17 @@ namespace Microsoft.StreamProcessing { var template = new TemporalEgressTemplate(typeof(TKey), typeof(TPayload), typeof(TResult), "Partitioned", "Interval", partitionedIntervalObservable.source.Properties.IsColumnar); if (partitionedIntervalObservable.constructor != null) - template.intervalFunction = (x, y, z) => partitionedIntervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { partitionedIntervalObservable.constructor.Parameters[0], "colkey[i].Key" }, - { partitionedIntervalObservable.constructor.Parameters[0], x }, - { partitionedIntervalObservable.constructor.Parameters[1], y }, - { partitionedIntervalObservable.constructor.Parameters[2], z }, - }); + { + template.intervalFunction = (x, y, z) => + partitionedIntervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { partitionedIntervalObservable.constructor.Parameters[0], "colkey[i].Key" }, + { partitionedIntervalObservable.constructor.Parameters[0], x }, + { partitionedIntervalObservable.constructor.Parameters[1], y }, + { partitionedIntervalObservable.constructor.Parameters[2], z }, + }); + } var keyType = typeof(PartitionKey<>).MakeGenericType(typeof(TKey)); var expandedCode = template.TransformText(); diff --git a/Sources/Core/Microsoft.StreamProcessing/Egress/TemporalArray/TemporalArrayEgressTransformer.cs b/Sources/Core/Microsoft.StreamProcessing/Egress/TemporalArray/TemporalArrayEgressTransformer.cs index a8dc623..79ef5b1 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Egress/TemporalArray/TemporalArrayEgressTransformer.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Egress/TemporalArray/TemporalArrayEgressTransformer.cs @@ -114,12 +114,15 @@ namespace Microsoft.StreamProcessing { var template = new TemporalArrayEgressTemplate(typeof(Empty), typeof(TPayload), typeof(TResult), string.Empty, "StartEdge", startEdgeObservable.source.Properties.IsColumnar); if (startEdgeObservable.constructor != null) - template.startEdgeFunction = (x, y) => startEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { startEdgeObservable.constructor.Parameters[0], x }, - { startEdgeObservable.constructor.Parameters[1], y }, - }); + { + template.startEdgeFunction = (x, y) => + startEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { startEdgeObservable.constructor.Parameters[0], x }, + { startEdgeObservable.constructor.Parameters[1], y }, + }); + } var keyType = typeof(Empty); var expandedCode = template.TransformText(); @@ -159,13 +162,16 @@ namespace Microsoft.StreamProcessing { var template = new TemporalArrayEgressTemplate(typeof(Empty), typeof(TPayload), typeof(TResult), string.Empty, "Interval", intervalObservable.source.Properties.IsColumnar); if (intervalObservable.constructor != null) - template.intervalFunction = (x, y, z) => intervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { intervalObservable.constructor.Parameters[0], x }, - { intervalObservable.constructor.Parameters[1], y }, - { intervalObservable.constructor.Parameters[2], z }, - }); + { + template.intervalFunction = (x, y, z) => + intervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { intervalObservable.constructor.Parameters[0], x }, + { intervalObservable.constructor.Parameters[1], y }, + { intervalObservable.constructor.Parameters[2], z }, + }); + } var keyType = typeof(Empty); var expandedCode = template.TransformText(); @@ -244,13 +250,16 @@ namespace Microsoft.StreamProcessing { var template = new TemporalArrayEgressTemplate(typeof(TKey), typeof(TPayload), typeof(TResult), "Partitioned", "StartEdge", partitionedStartEdgeObservable.source.Properties.IsColumnar); if (partitionedStartEdgeObservable.constructor != null) - template.startEdgeFunction = (x, y) => partitionedStartEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { partitionedStartEdgeObservable.constructor.Parameters[0], "colkey[i].Key" }, - { partitionedStartEdgeObservable.constructor.Parameters[0], x }, - { partitionedStartEdgeObservable.constructor.Parameters[1], y }, - }); + { + template.startEdgeFunction = (x, y) => + partitionedStartEdgeObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { partitionedStartEdgeObservable.constructor.Parameters[0], "colkey[i].Key" }, + { partitionedStartEdgeObservable.constructor.Parameters[0], x }, + { partitionedStartEdgeObservable.constructor.Parameters[1], y }, + }); + } var keyType = typeof(PartitionKey<>).MakeGenericType(typeof(TKey)); var expandedCode = template.TransformText(); @@ -290,14 +299,17 @@ namespace Microsoft.StreamProcessing { var template = new TemporalArrayEgressTemplate(typeof(TKey), typeof(TPayload), typeof(TResult), "Partitioned", "Interval", partitionedIntervalObservable.source.Properties.IsColumnar); if (partitionedIntervalObservable.constructor != null) - template.intervalFunction = (x, y, z) => partitionedIntervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( - new Dictionary - { - { partitionedIntervalObservable.constructor.Parameters[0], "colkey[i].Key" }, - { partitionedIntervalObservable.constructor.Parameters[0], x }, - { partitionedIntervalObservable.constructor.Parameters[1], y }, - { partitionedIntervalObservable.constructor.Parameters[2], z }, - }); + { + template.intervalFunction = (x, y, z) => + partitionedIntervalObservable.constructor.Body.ExpressionToCSharpStringWithParameterSubstitution( + new Dictionary + { + { partitionedIntervalObservable.constructor.Parameters[0], "colkey[i].Key" }, + { partitionedIntervalObservable.constructor.Parameters[0], x }, + { partitionedIntervalObservable.constructor.Parameters[1], y }, + { partitionedIntervalObservable.constructor.Parameters[2], z }, + }); + } var keyType = typeof(PartitionKey<>).MakeGenericType(typeof(TKey)); var expandedCode = template.TransformText(); diff --git a/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs b/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs index 0204335..e1ebdd9 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Fusible/FuseModule.cs @@ -38,11 +38,14 @@ namespace Microsoft.StreamProcessing { if (this.expressions.Count == 0) { - this.expressions.Add(new ExpressionProfile { - category = ExpressionCategory.Select, - inputType = typeof(TPayload), - outputType = typeof(TResult), - expression = selector }); + this.expressions.Add( + new ExpressionProfile + { + category = ExpressionCategory.Select, + inputType = typeof(TPayload), + outputType = typeof(TResult), + expression = selector + }); return this; } var prev = this.expressions[this.expressions.Count - 1]; @@ -76,12 +79,15 @@ namespace Microsoft.StreamProcessing { if (this.expressions.Count == 0) { - this.expressions.Add(new ExpressionProfile { - category = ExpressionCategory.Select, - hasStartEdge = true, - inputType = typeof(TPayload), - outputType = typeof(TResult), - expression = selector }); + this.expressions.Add( + new ExpressionProfile + { + category = ExpressionCategory.Select, + hasStartEdge = true, + inputType = typeof(TPayload), + outputType = typeof(TResult), + expression = selector + }); return this; } var prev = this.expressions[this.expressions.Count - 1]; @@ -120,13 +126,16 @@ namespace Microsoft.StreamProcessing { if (this.expressions.Count == 0) { - this.expressions.Add(new ExpressionProfile { - category = ExpressionCategory.Select, - hasKey = true, - keyType = typeof(TKey), - inputType = typeof(TPayload), - outputType = typeof(TResult), - expression = selector }); + this.expressions.Add( + new ExpressionProfile + { + category = ExpressionCategory.Select, + hasKey = true, + keyType = typeof(TKey), + inputType = typeof(TPayload), + outputType = typeof(TResult), + expression = selector + }); return this; } var prev = this.expressions[this.expressions.Count - 1]; @@ -494,13 +503,16 @@ namespace Microsoft.StreamProcessing public override string ToString() { string output = string.Empty; - foreach (var item in this.expressions) output = output + foreach (var item in this.expressions) + { + output = output + "Category:" + item.category.ToString() + ":" + "KeyType:" + (item.keyType?.ToString() ?? "null") + ":" + "OutputType:" + (item.outputType?.ToString() ?? "null") + ":" + "UsesKey:" + item.hasKey.ToString() + ":" + "UsesStartEdge:" + item.hasStartEdge.ToString() + ":" + "Expression:" + item.expression.ExpressionToCSharp() + Environment.NewLine; + } if (this.durationAdjustment != null) output = output + "Duration:" + this.durationAdjustment + Environment.NewLine; return output; } @@ -610,7 +622,9 @@ namespace Microsoft.StreamProcessing } } - if (this.durationAdjustment != null) currentStatement = Expression.Block(Expression.IfThen( + if (this.durationAdjustment != null) + { + currentStatement = Expression.Block(Expression.IfThen( Expression.GreaterThan(otherParam, syncParam), Expression.Block( Expression.Assign( @@ -618,12 +632,14 @@ namespace Microsoft.StreamProcessing this.durationAdjustment.ExpressionEquals(Expression.Constant(StreamEvent.InfinitySyncTime)) ? this.durationAdjustment : Expression.Add(syncParam, this.durationAdjustment)), currentStatement))); - - if (canBePunctuation) currentStatement = Expression.Block(Expression.IfThenElse( - Expression.Equal(otherParam, Expression.Constant(long.MinValue)), - ParameterSubstituter.Replace(action.Parameters[2], Expression.Constant(default(TResult), typeof(TResult)), action.Body), - currentStatement)); - + } + if (canBePunctuation) + { + currentStatement = Expression.Block(Expression.IfThenElse( + Expression.Equal(otherParam, Expression.Constant(long.MinValue)), + ParameterSubstituter.Replace(action.Parameters[2], Expression.Constant(default(TResult), typeof(TResult)), action.Body), + currentStatement)); + } return Expression.Lambda>(currentStatement, syncParam, otherParam, parameter, keyParam); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.cs index ad065ee..28cda9c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.cs @@ -41,8 +41,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } + int offset = value.Offset; while (offset < n) @@ -104,8 +108,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } + int offset = value.Offset; while (offset < n) diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.tt b/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.tt index b1f8bee..2244588 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.tt +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/AtemporalArray/AtemporalArrayIngressSubscription.tt @@ -64,8 +64,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } + int offset = value.Offset; while (offset < n) diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs index d39c255..d260f3f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/ImpatienceSorter.cs @@ -280,11 +280,12 @@ namespace Microsoft.StreamProcessing.Internal [EditorBrowsable(EditorBrowsableState.Never)] public void Dispose() { - foreach (var f in this.Fibers) - f.Dispose(); + foreach (var f in this.Fibers) f.Dispose(); + for (int i = 0; i < this.MergeSource.Length; i++) - if (this.MergeSource[i] != null) - this.MergeSource[i].Dispose(); + { + if (this.MergeSource[i] != null) this.MergeSource[i].Dispose(); + } this.ecbPool.Dispose(); } } @@ -686,11 +687,13 @@ namespace Microsoft.StreamProcessing.Internal [EditorBrowsable(EditorBrowsableState.Never)] public void Dispose() { - foreach (var f in this.Fibers) - f.Dispose(); + foreach (var f in this.Fibers) f.Dispose(); + for (int i = 0; i < this.MergeSource.Length; i++) - if (this.MergeSource[i] != null) - this.MergeSource[i].Dispose(); + { + if (this.MergeSource[i] != null) this.MergeSource[i].Dispose(); + } + this.ecbPool.Dispose(); } } diff --git a/Sources/Core/Microsoft.StreamProcessing/Ingress/TemporalArray/TemporalArrayIngressSubscription.cs b/Sources/Core/Microsoft.StreamProcessing/Ingress/TemporalArray/TemporalArrayIngressSubscription.cs index 34c11bf..b64e0b3 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Ingress/TemporalArray/TemporalArrayIngressSubscription.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Ingress/TemporalArray/TemporalArrayIngressSubscription.cs @@ -145,10 +145,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } int offset = value.Offset; - while (offset < n) { var full = this.currentBatch.Add( @@ -229,10 +231,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } int offset = value.Offset; - while (offset < n) { var full = this.currentBatch.Add( @@ -296,10 +300,12 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } int offset = value.Offset; - while (offset < n) { var full = this.currentBatch.Add( @@ -379,8 +385,11 @@ namespace Microsoft.StreamProcessing int n = value.Count + value.Offset; // Sanity check - if (n > value.Array.Length) throw new IngressException( - $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + if (n > value.Array.Length) + { + throw new IngressException( + $"Invalid array segment. Offset: {value.Offset} Count: {value.Count} Length: {value.Array.Length}"); + } int offset = value.Offset; while (offset < n) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaStreamable.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaStreamable.cs index 4b5386c..41e1c9a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaStreamable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/AfaStreamable.cs @@ -92,9 +92,12 @@ namespace Microsoft.StreamProcessing ? GetUngroupedDAfaPipe(emptyObserver) as IStreamObserver : new CompiledUngroupedDAfaPipe(downcast, observer as IStreamObserver, this.afa, this.MaxDuration) as IStreamObserver; } - else return this.Source.Properties.IsColumnar - ? GetUngroupedAFAPipe(emptyObserver) as IStreamObserver - : new CompiledUngroupedAfaPipe(downcast, observer as IStreamObserver, this.afa, this.MaxDuration) as IStreamObserver; + else + { + return this.Source.Properties.IsColumnar + ? GetUngroupedAFAPipe(emptyObserver) as IStreamObserver + : new CompiledUngroupedAfaPipe(downcast, observer as IStreamObserver, this.afa, this.MaxDuration) as IStreamObserver; + } } else { diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledAfa.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledAfa.cs index 3af4184..d50f149 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledAfa.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledAfa.cs @@ -165,7 +165,7 @@ namespace Microsoft.StreamProcessing toState = to, Initialize = mearc.Initialize != null ? mearc.Initialize.Compile() - : defaultAccumulator == default + : this.defaultAccumulator == default ? (ts, reg) => default // To avoid a closure : (Func)((ts, reg) => this.defaultAccumulator), Accumulate = mearc.Accumulate != null ? mearc.Accumulate.Compile() : (ts, ev, reg, acc) => acc, @@ -176,9 +176,12 @@ namespace Microsoft.StreamProcessing arcType = mearc.ArcType }; for (int i = 0; i < this.numStartStates; i++) + { if (from == this.startStates[i]) + { this.multiEventStateMap[from][multiEventCount].fromStartState = true; - + } + } multiEventCount++; break; case ArcType.ListElement: diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/PatternMatcher.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/PatternMatcher.cs index 8cb81ba..1ed3b19 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/PatternMatcher.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Afa/PatternMatcher.cs @@ -410,8 +410,9 @@ namespace Microsoft.StreamProcessing result.AddArc(from, to, kvp2.Value); if (nextPattern.finalStates.Contains(kvp2.Key)) - if (!result.finalStates.Contains(to)) - result.finalStates.Add(to); + { + if (!result.finalStates.Contains(to)) result.finalStates.Add(to); + } } } } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/AlterLifetime/PartitionedAlterLifetimeVariableDurationByKeyPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/AlterLifetime/PartitionedAlterLifetimeVariableDurationByKeyPipe.cs index 962123f..0aa0204 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/AlterLifetime/PartitionedAlterLifetimeVariableDurationByKeyPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/AlterLifetime/PartitionedAlterLifetimeVariableDurationByKeyPipe.cs @@ -71,17 +71,26 @@ namespace Microsoft.StreamProcessing { var iter = FastDictionary.IteratorStart; while (this.lastSync.Iterate(ref iter)) - if (this.lastSync.entries[iter].value < vsync[i]) - this.lastSync.entries[iter].value = Math.Max(vsync[i], this.lastSync.entries[iter].value); + { + if (this.lastSync.entries[iter].value < vsync[i]) + { + this.lastSync.entries[iter].value = Math.Max(vsync[i], this.lastSync.entries[iter].value); + } + } } else if (vother[i] == PartitionedStreamEvent.PunctuationOtherTime) { partition = batch.key.col[i].Key; if (this.startTimeSelector != null) vsync[i] = this.startTimeSelectorCompiled(partition, vsync[i]); + if (this.lastSync.Lookup(partition, out index)) + { this.lastSync.entries[index].value = Math.Max(vsync[i], this.lastSync.entries[index].value); + } else + { this.lastSync.Insert(ref index, partition, vsync[i]); + } } continue; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs index 9cbf221..b76c852 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs @@ -134,8 +134,11 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, pKey, new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, pKey, new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey }); + } } protected override void ProcessBothBatches(StreamMessage leftBatch, StreamMessage rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs index 1ba0991..7fef6ff 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs @@ -133,8 +133,11 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, pKey, new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, pKey, new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey }); + } } protected override void ProcessBothBatches(StreamMessage, TGroupKey>, TLeft> leftBatch, StreamMessage, TGroupKey>, TRight> rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs index c158fbd..c244d3a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeSimple.cs @@ -131,10 +131,13 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, - pKey, - new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey, hash = hash }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, + pKey, + new PartitionEntry { endPointHeap = this.endpointGenerator(), key = pKey, hash = hash }); + } } protected override void ProcessBothBatches(StreamMessage, TLeft> leftBatch, StreamMessage, TRight> rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs index 5dc1e2d..f8793c4 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/EquiJoinStreamable.cs @@ -78,19 +78,24 @@ namespace Microsoft.StreamProcessing { // Simple case: key type is a simple partition key if (typeof(TKey).GetGenericTypeDefinition() == typeof(PartitionKey<>)) + { return typeof(PartitionedEquiJoinPipeSimple<,,,>).MakeGenericType( typeof(TLeft), typeof(TRight), typeof(TResult), typeof(TKey).GetPartitionType()); + } // Middle case: type is one level of grouping, e.g., TKey = CompoundGroupKey, TG> if (typeof(TKey).GenericTypeArguments[0].GetGenericTypeDefinition() == typeof(PartitionKey<>)) + { return typeof(PartitionedEquiJoinPipeCompound<,,,,>).MakeGenericType( typeof(TKey).GenericTypeArguments[1], typeof(TLeft), typeof(TRight), typeof(TResult), typeof(TKey).GetPartitionType()); + } + // Generic case return typeof(PartitionedEquiJoinPipe<,,,,>).MakeGenericType( typeof(TKey), @@ -104,19 +109,25 @@ namespace Microsoft.StreamProcessing { // Simple case: key type is a simple partition key if (typeof(TKey).GetGenericTypeDefinition() == typeof(PartitionKey<>)) + { return typeof(PartitionedFixedIntervalEquiJoinPipeSimple<,,,>).MakeGenericType( typeof(TLeft), typeof(TRight), typeof(TResult), typeof(TKey).GetPartitionType()); + } + // Middle case: type is one level of grouping, e.g., TKey = CompoundGroupKey, TG> if (typeof(TKey).GenericTypeArguments[0].GetGenericTypeDefinition() == typeof(PartitionKey<>)) + { return typeof(PartitionedFixedIntervalEquiJoinPipeCompound<,,,,>).MakeGenericType( typeof(TKey).GenericTypeArguments[1], typeof(TLeft), typeof(TRight), typeof(TResult), typeof(TKey).GetPartitionType()); + } + // Generic case return typeof(PartitionedFixedIntervalEquiJoinPipe<,,,,>).MakeGenericType( typeof(TKey), diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/FixedIntervalEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/FixedIntervalEquiJoinPipe.cs index b6ebe0e..c70849f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/FixedIntervalEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/FixedIntervalEquiJoinPipe.cs @@ -99,13 +99,17 @@ namespace Microsoft.StreamProcessing { UpdateTime(this.nextLeftTime); if (leftBatch.vother.col[leftBatch.iter] == StreamEvent.PunctuationOtherTime) + { AddPunctuationToBatch(this.nextLeftTime); + } else + { ProcessLeftEvent( this.nextLeftTime, ref leftBatch.key.col[leftBatch.iter], leftBatch[leftBatch.iter], leftBatch.hash.col[leftBatch.iter]); + } leftBatch.iter++; @@ -122,13 +126,17 @@ namespace Microsoft.StreamProcessing { UpdateTime(this.nextRightTime); if (rightBatch.vother.col[rightBatch.iter] == StreamEvent.PunctuationOtherTime) + { AddPunctuationToBatch(this.nextRightTime); + } else + { ProcessRightEvent( this.nextRightTime, ref rightBatch.key.col[rightBatch.iter], rightBatch[rightBatch.iter], rightBatch.hash.col[rightBatch.iter]); + } rightBatch.iter++; @@ -167,13 +175,17 @@ namespace Microsoft.StreamProcessing UpdateTime(this.nextLeftTime); if (batch.vother.col[batch.iter] == StreamEvent.PunctuationOtherTime) + { AddPunctuationToBatch(this.nextLeftTime); + } else + { ProcessLeftEvent( this.nextLeftTime, ref batch.key.col[batch.iter], batch[batch.iter], batch.hash.col[batch.iter]); + } batch.iter++; } @@ -202,13 +214,17 @@ namespace Microsoft.StreamProcessing UpdateTime(this.nextRightTime); if (batch.vother.col[batch.iter] == StreamEvent.PunctuationOtherTime) + { AddPunctuationToBatch(this.nextRightTime); + } else + { ProcessRightEvent( this.nextRightTime, ref batch.key.col[batch.iter], batch[batch.iter], batch.hash.col[batch.iter]); + } batch.iter++; } @@ -311,8 +327,8 @@ namespace Microsoft.StreamProcessing var rin = this.rightIntervalMap.Values[index]; if (this.keyComparerEquals(key, rin.Key)) { - long leftEnd = currentTime + leftDuration; - long rightEnd = rin.Start + rightDuration; + long leftEnd = currentTime + this.leftDuration; + long rightEnd = rin.Start + this.rightDuration; AddToBatch( currentTime, leftEnd < rightEnd ? leftEnd : rightEnd, @@ -334,8 +350,8 @@ namespace Microsoft.StreamProcessing var lin = this.leftIntervalMap.Values[index]; if (this.keyComparerEquals(key, lin.Key)) { - long rightEnd = currentTime + rightDuration; - long leftEnd = lin.Start + leftDuration; + long rightEnd = currentTime + this.rightDuration; + long leftEnd = lin.Start + this.leftDuration; AddToBatch( currentTime, rightEnd < leftEnd ? rightEnd : leftEnd, diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs index 4974301..48cf05f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipe.cs @@ -87,8 +87,11 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, pKey, new PartitionEntry { key = pKey }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, pKey, new PartitionEntry { key = pKey }); + } } protected override void ProcessBothBatches(StreamMessage leftBatch, StreamMessage rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) @@ -457,8 +460,8 @@ namespace Microsoft.StreamProcessing { if (this.keyComparerEquals(key, partition.rightIntervalMap.Values[index].Key)) { - long leftEnd = currentTime + leftDuration; - long rightEnd = partition.rightIntervalMap.Values[index].Start + rightDuration; + long leftEnd = currentTime + this.leftDuration; + long rightEnd = partition.rightIntervalMap.Values[index].Start + this.rightDuration; AddToBatch( currentTime, leftEnd < rightEnd ? leftEnd : rightEnd, @@ -479,8 +482,8 @@ namespace Microsoft.StreamProcessing { if (this.keyComparerEquals(key, partition.leftIntervalMap.Values[index].Key)) { - long rightEnd = currentTime + rightDuration; - long leftEnd = partition.leftIntervalMap.Values[index].Start + rightDuration; + long rightEnd = currentTime + this.rightDuration; + long leftEnd = partition.leftIntervalMap.Values[index].Start + this.rightDuration; AddToBatch( currentTime, rightEnd < leftEnd ? rightEnd : leftEnd, diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs index c6f3b7c..61d2643 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs @@ -86,8 +86,11 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, pKey, new PartitionEntry { key = pKey }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, pKey, new PartitionEntry { key = pKey }); + } } protected override void ProcessBothBatches(StreamMessage, TGroupKey>, TLeft> leftBatch, StreamMessage, TGroupKey>, TRight> rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) @@ -461,8 +464,8 @@ namespace Microsoft.StreamProcessing { if (this.keyComparerEquals(key, partition.rightIntervalMap.Values[index].Key)) { - long leftEnd = currentTime + leftDuration; - long rightEnd = partition.rightIntervalMap.Values[index].Start + rightDuration; + long leftEnd = currentTime + this.leftDuration; + long rightEnd = partition.rightIntervalMap.Values[index].Start + this.rightDuration; AddToBatch( currentTime, leftEnd < rightEnd ? leftEnd : rightEnd, @@ -484,8 +487,8 @@ namespace Microsoft.StreamProcessing { if (this.keyComparerEquals(key, partition.leftIntervalMap.Values[index].Key)) { - long rightEnd = currentTime + rightDuration; - long leftEnd = partition.leftIntervalMap.Values[index].Start + leftDuration; + long rightEnd = currentTime + this.rightDuration; + long leftEnd = partition.leftIntervalMap.Values[index].Start + this.leftDuration; AddToBatch( currentTime, rightEnd < leftEnd ? rightEnd : leftEnd, diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs index 5f6827c..5985985 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeSimple.cs @@ -84,10 +84,13 @@ namespace Microsoft.StreamProcessing this.leftQueue.Insert(pKey, new Queue()); this.rightQueue.Insert(pKey, new Queue()); - if (!this.partitionData.Lookup(pKey, out int index)) this.partitionData.Insert( - ref index, - pKey, - new PartitionEntry { key = pKey, hash = hash }); + if (!this.partitionData.Lookup(pKey, out int index)) + { + this.partitionData.Insert( + ref index, + pKey, + new PartitionEntry { key = pKey, hash = hash }); + } } protected override void ProcessBothBatches(StreamMessage, TLeft> leftBatch, StreamMessage, TRight> rightBatch, out bool leftBatchDone, out bool rightBatchDone, out bool leftBatchFree, out bool rightBatchFree) @@ -435,8 +438,8 @@ namespace Microsoft.StreamProcessing var intervals = partition.rightIntervalMap.Find(partition.hash); while (intervals.Next(out var index)) { - long leftEnd = currentTime + leftDuration; - long rightEnd = partition.rightIntervalMap.Values[index].Start + rightDuration; + long leftEnd = currentTime + this.leftDuration; + long rightEnd = partition.rightIntervalMap.Values[index].Start + this.rightDuration; AddToBatch( currentTime, leftEnd < rightEnd ? leftEnd : rightEnd, @@ -453,8 +456,8 @@ namespace Microsoft.StreamProcessing var intervals = partition.leftIntervalMap.Find(partition.hash); while (intervals.Next(out var index)) { - long rightEnd = currentTime + rightDuration; - long leftEnd = partition.leftIntervalMap.Values[index].Start + leftDuration; + long rightEnd = currentTime + this.rightDuration; + long leftEnd = partition.leftIntervalMap.Values[index].Start + this.leftDuration; AddToBatch( currentTime, rightEnd < leftEnd ? rightEnd : leftEnd, diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs index b30a34e..1fdf85f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/PartitionedSessionWindowPipe.cs @@ -252,10 +252,14 @@ namespace Microsoft.StreamProcessing int iter = FastDictionary.IteratorStart; var temp = new List>(); while (this.lastDataTimeDictionary.Iterate(ref iter)) + { if (this.stateDictionary.entries[iter].value.Any()) + { temp.Add(Tuple.Create( this.lastDataTimeDictionary.entries[iter].key, Math.Min(this.lastDataTimeDictionary.entries[iter].value + this.sessionTimeout, this.windowEndTimeDictionary.entries[iter].value), this.getPartitionKey(this.lastDataTimeDictionary.entries[iter].key))); + } + } foreach (var item in temp.OrderBy(o => o.Item2)) { if (!this.orderedKeysDictionary.TryGetValue(item.Item3, out var orderedKeys)) diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/SessionWindowPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/SessionWindowPipe.cs index bedceae..57d64ee 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/SessionWindowPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/SessionWindow/SessionWindowPipe.cs @@ -222,10 +222,14 @@ namespace Microsoft.StreamProcessing int iter = FastDictionary.IteratorStart; var temp = new List>(); while (this.lastDataTimeDictionary.Iterate(ref iter)) + { if (this.stateDictionary.entries[iter].value.Any()) + { temp.Add(Tuple.Create( this.windowEndTimeDictionary.entries[iter].key, Math.Min(this.lastDataTimeDictionary.entries[iter].value + this.sessionTimeout, this.windowEndTimeDictionary.entries[iter].value))); + } + } foreach (var item in temp.OrderBy(o => o.Item2)) this.orderedKeys.AddLast(new LinkedListNode(item.Item1)); base.UpdatePointers(); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs index 6ba6681..ad7b83a 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/PartitionedStitchPipe.cs @@ -413,9 +413,9 @@ namespace Microsoft.StreamProcessing { var iterator = FastDictionary2.IteratorStart; while (closed.Value.Iterate(ref iterator)) - foreach (var v in closed.Value.entries[iterator].value) - Emit(v); - + { + foreach (var v in closed.Value.entries[iterator].value) Emit(v); + } closed.Value.Initialize(); this.ClosedEvents.entries[this.ClosedEventsIndex].value.Remove(closed.Key); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs index fe1b89d..0e36c0f 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Stitch/StitchPipe.cs @@ -365,9 +365,9 @@ namespace Microsoft.StreamProcessing { var iterator = FastDictionary2.IteratorStart; while (closed.Value.Iterate(ref iterator)) - foreach (var v in closed.Value.entries[iterator].value) - Emit(v); - + { + foreach (var v in closed.Value.entries[iterator].value) Emit(v); + } closed.Value.Initialize(); this.ClosedEvents.Remove(closed.Key); diff --git a/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs b/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs index 9b06e3e..13dea2e 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Operators/Where/MultiStringTransforms.cs @@ -174,7 +174,8 @@ namespace Microsoft.StreamProcessing protected override Expression VisitBinary(BinaryExpression node) { string left_result; - switch (node.NodeType) { + switch (node.NodeType) + { case ExpressionType.OrElse: this.inPlace = false; Visit(node.Left); diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs index 43ceb54..32fa797 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamProperties/StreamProperties.cs @@ -556,23 +556,29 @@ namespace Microsoft.StreamProcessing var newEqualityComparerSelectorMap = new Dictionary(); var newPayloadEqualityComparer = EqualityComparerExpression.Default; - if (hasStartEdge) foreach (var kvp in this.EqualityComparerSelectorMap) + if (hasStartEdge) { - if (kvp.Key.ExpressionEquals(selector)) + foreach (var kvp in this.EqualityComparerSelectorMap) { - newPayloadEqualityComparer = kvp.Value as IEqualityComparerExpression; + if (kvp.Key.ExpressionEquals(selector)) + { + newPayloadEqualityComparer = kvp.Value as IEqualityComparerExpression; + } } } var newSortSelectorMap = new Dictionary(); IComparerExpression newPayloadComparer = null; - if (hasStartEdge) foreach (var kvp in this.SortSelectorMap) + if (hasStartEdge) { - if (kvp.Key.ExpressionEquals(selector)) + foreach (var kvp in this.SortSelectorMap) { - newPayloadComparer = ComparerExpression.Default; - Expression> fullSelector = (x => x); - newSortSelectorMap.Add(fullSelector, kvp.Value); + if (kvp.Key.ExpressionEquals(selector)) + { + newPayloadComparer = ComparerExpression.Default; + Expression> fullSelector = (x => x); + newSortSelectorMap.Add(fullSelector, kvp.Value); + } } } @@ -924,10 +930,14 @@ namespace Microsoft.StreamProcessing this.constantHopOffset = properties.ConstantHopOffset; } - if (properties.IsIntervalFree) { - this.IntervalFreeValidator = IntervalFreeValidation; } - if (properties.IsSyncTimeSimultaneityFree) { - this.SyncTimeSimultaneityFreeValidator = SyncTimeSimulteneityFreeValidation; } + if (properties.IsIntervalFree) + { + this.IntervalFreeValidator = IntervalFreeValidation; + } + if (properties.IsSyncTimeSimultaneityFree) + { + this.SyncTimeSimultaneityFreeValidator = SyncTimeSimulteneityFreeValidation; + } if (typeof(TKey).GetPartitionType() != null) { @@ -974,9 +984,12 @@ namespace Microsoft.StreamProcessing private void SimpleValidation(long sync, TKey key) { - if (this.lastSeenTimestamp > sync) throw new InvalidOperationException( - "The operator AlterLifetime produced output out of sync-time order on an input event. The current internal sync time is " + this.lastSeenTimestamp.ToString(CultureInfo.InvariantCulture) - + ". The event's sync time is " + sync.ToString(CultureInfo.InvariantCulture) + "."); + if (this.lastSeenTimestamp > sync) + { + throw new InvalidOperationException( + "The operator AlterLifetime produced output out of sync-time order on an input event. The current internal sync time is " + this.lastSeenTimestamp.ToString(CultureInfo.InvariantCulture) + + ". The event's sync time is " + sync.ToString(CultureInfo.InvariantCulture) + "."); + } this.lastSeenTimestamp = sync; } @@ -985,10 +998,13 @@ namespace Microsoft.StreamProcessing object partitionKey = this.getPartitionKey(key); if (this.lastSeenTimestampPartitioned.TryGetValue(partitionKey, out long current)) { - if (current > sync) throw new InvalidOperationException( - "The operator AlterLifetime produced output out of sync-time order on an input event. The current internal sync time is " + current.ToString(CultureInfo.InvariantCulture) - + ". The event's sync time is " + sync.ToString(CultureInfo.InvariantCulture) - + ". The event's partition key is " + current.ToString(CultureInfo.InvariantCulture) + "."); + if (current > sync) + { + throw new InvalidOperationException( + "The operator AlterLifetime produced output out of sync-time order on an input event. The current internal sync time is " + current.ToString(CultureInfo.InvariantCulture) + + ". The event's sync time is " + sync.ToString(CultureInfo.InvariantCulture) + + ". The event's partition key is " + current.ToString(CultureInfo.InvariantCulture) + "."); + } this.lastSeenTimestampPartitioned[partitionKey] = sync; } else @@ -997,26 +1013,34 @@ namespace Microsoft.StreamProcessing private void ConstantDurationValidation(long sync, long other) { - if (other < sync) throw new StreamProcessingException(string.Format( - CultureInfo.InvariantCulture, - "Expected only start and interval events, but encountered an end edge event at time {0}.", - sync.ToString(CultureInfo.InvariantCulture))); - + if (other < sync) + { + throw new StreamProcessingException(string.Format( + CultureInfo.InvariantCulture, + "Expected only start and interval events, but encountered an end edge event at time {0}.", + sync.ToString(CultureInfo.InvariantCulture))); + } if (!this.constantDuration.HasValue) this.constantDuration = sync - other; if (this.constantDuration.Value == StreamEvent.InfinitySyncTime) { - if (other != StreamEvent.InfinitySyncTime) throw new StreamProcessingException(string.Format( + if (other != StreamEvent.InfinitySyncTime) + { + throw new StreamProcessingException(string.Format( + CultureInfo.InvariantCulture, + "Expected only start edges, found an interval of length {0} at time {1}.", + (other - sync).ToString(CultureInfo.InvariantCulture), + sync.ToString(CultureInfo.InvariantCulture))); + } + } + else if (other - sync != this.constantDuration.Value) + { + throw new StreamProcessingException(string.Format( CultureInfo.InvariantCulture, - "Expected only start edges, found an interval of length {0} at time {1}.", + "Expected only intervals of time {0}, found an interval of length {1} at time {2}.", this.constantDuration.Value.ToString(CultureInfo.InvariantCulture), (other - sync).ToString(CultureInfo.InvariantCulture), sync.ToString(CultureInfo.InvariantCulture))); } - else if (other - sync != this.constantDuration.Value) throw new StreamProcessingException(string.Format( - CultureInfo.InvariantCulture, - "Expected only intervals of time {0}, found an interval of length {1} at time {2}.", this.constantDuration.Value.ToString(CultureInfo.InvariantCulture), - (other - sync).ToString(CultureInfo.InvariantCulture), - sync.ToString(CultureInfo.InvariantCulture))); } private void ConstantHopValidation(long sync, long other) @@ -1031,22 +1055,30 @@ namespace Microsoft.StreamProcessing } else { - if ((sync - this.constantHopOffset.Value) % this.constantHopLength.Value != 0) throw new StreamProcessingException(string.Format( - CultureInfo.InvariantCulture, - "The sync time {0} does not correspond to the given hopping window properties of length {1} and offset {2}.", - sync.ToString(CultureInfo.InvariantCulture), this.constantHopLength.Value.ToString(CultureInfo.InvariantCulture), this.constantHopOffset.Value.ToString(CultureInfo.InvariantCulture))); + if ((sync - this.constantHopOffset.Value) % this.constantHopLength.Value != 0) + { + throw new StreamProcessingException(string.Format( + CultureInfo.InvariantCulture, + "The sync time {0} does not correspond to the given hopping window properties of length {1} and offset {2}.", + sync.ToString(CultureInfo.InvariantCulture), this.constantHopLength.Value.ToString(CultureInfo.InvariantCulture), this.constantHopOffset.Value.ToString(CultureInfo.InvariantCulture))); + } } } private void SyncTimeSimulteneityFreeValidation(long sync, long other, TKey key) { if (!this.lastSyncTimeForSimultaneous.ContainsKey(key)) + { this.lastSyncTimeForSimultaneous.Add(key, sync); - else if (this.lastSyncTimeForSimultaneous[key] == sync) throw new StreamProcessingException(string.Format( - CultureInfo.InvariantCulture, - "Was not expecting to see events happening simultaneously, but found simultaneous events at time {0} for key {1}.", - sync.ToString(CultureInfo.InvariantCulture), - key.ToString())); + } + else if (this.lastSyncTimeForSimultaneous[key] == sync) + { + throw new StreamProcessingException(string.Format( + CultureInfo.InvariantCulture, + "Was not expecting to see events happening simultaneously, but found simultaneous events at time {0} for key {1}.", + sync.ToString(CultureInfo.InvariantCulture), + key.ToString())); + } } public override void ProduceQueryPlan(PlanNode previous) => throw new NotImplementedException(); diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/AfaExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/AfaExtensions.cs index 0d6a2c3..60773be 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/AfaExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/AfaExtensions.cs @@ -285,10 +285,12 @@ namespace Microsoft.StreamProcessing Expression> initializeTemplate = (ts, reg) => CallInliner.Call(accumulatorInitialization); var userInitializeFunction = initializeTemplate.InlineCalls(); var accumulatorLocalForInitialize = Expression.Parameter(typeof(TAccumulator), "acc"); - var initializeBody = new List() { + var initializeBody = new List() + { Expression.Assign(accumulatorLocalForInitialize, userInitializeFunction.Body), Expression.Assign(Expression.MakeMemberAccess(accumulatorLocalForInitialize, memberInfo), Expression.Constant(initialValueForBooleanField, typeof(bool))), - accumulatorLocalForInitialize }; + accumulatorLocalForInitialize + }; var initializeFunction = (Expression>)Expression.Lambda( Expression.Block(new[] { accumulatorLocalForInitialize }, initializeBody), Expression.Parameter(typeof(long), "ts"), Expression.Parameter(typeof(TRegister), "reg")); diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.cs b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.cs index 3af6d37..ee97396 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.cs @@ -109,7 +109,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2) => new StructTuple { + (output1, output2) => new StructTuple + { Item1 = output1, Item2 = output2 }; @@ -169,7 +170,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2) => new StructTuple { + (output1, output2) => new StructTuple + { Item1 = output1, Item2 = output2 }; @@ -218,7 +220,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3) => new StructTuple { + (output1, output2, output3) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3 @@ -286,7 +289,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3) => new StructTuple { + (output1, output2, output3) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3 @@ -341,7 +345,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4) => new StructTuple { + (output1, output2, output3, output4) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -417,7 +422,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4) => new StructTuple { + (output1, output2, output3, output4) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -478,7 +484,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5) => new StructTuple { + (output1, output2, output3, output4, output5) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -562,7 +569,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5) => new StructTuple { + (output1, output2, output3, output4, output5) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -629,7 +637,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6) => new StructTuple { + (output1, output2, output3, output4, output5, output6) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -721,7 +730,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6) => new StructTuple { + (output1, output2, output3, output4, output5, output6) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -794,7 +804,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -894,7 +905,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -973,7 +985,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1081,7 +1094,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1166,7 +1180,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1282,7 +1297,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1373,7 +1389,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1497,7 +1514,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1594,7 +1612,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1726,7 +1745,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1829,7 +1849,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -1969,7 +1990,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2078,7 +2100,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2226,7 +2249,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2341,7 +2365,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2497,7 +2522,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2618,7 +2644,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14, output15) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14, output15) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, @@ -2782,7 +2809,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression>> aggregateMerger = - (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14, output15) => new StructTuple { + (output1, output2, output3, output4, output5, output6, output7, output8, output9, output10, output11, output12, output13, output14, output15) => new StructTuple + { Item1 = output1, Item2 = output2, Item3 = output3, diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.tt b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.tt index 5c7e921..bdc1939 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.tt +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/GroupAggregateTemplate.tt @@ -113,7 +113,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression, StructTuple<<#= IterateComma("TOutput$", count) #>>>> aggregateMerger = - (<#= IterateComma("output$", count) #>) => new StructTuple<<#= IterateComma("TOutput$", count) #>> { + (<#= IterateComma("output$", count) #>) => new StructTuple<<#= IterateComma("TOutput$", count) #>> + { <#= IterateCommaLine(" Item$ = output$", count) #> }; @@ -165,7 +166,8 @@ namespace Microsoft.StreamProcessing Invariant.IsNotNull(merger, nameof(merger)); Expression, StructTuple<<#= IterateComma("TOutput$", count) #>>>> aggregateMerger = - (<#= IterateComma("output$", count) #>) => new StructTuple<<#= IterateComma("TOutput$", count) #>> { + (<#= IterateComma("output$", count) #>) => new StructTuple<<#= IterateComma("TOutput$", count) #>> + { <#= IterateCommaLine(" Item$ = output$", count) #> }; Expression, StructTuple<<#= IterateComma("TOutput$", count) #>>, TOutput>> reducerTemplate = diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/LifetimeExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/LifetimeExtensions.cs index 24b327a..8e1bec9 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/LifetimeExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/LifetimeExtensions.cs @@ -75,13 +75,17 @@ namespace Microsoft.StreamProcessing } if (windowSize % period == 0) + { return source.AlterEventLifetime(vs => AdjustStartTime(vs, offset, period), windowSize) .SetProperty().IsConstantHop(true, period, offset); + } else + { return source.AlterEventLifetime( vs => AdjustStartTime(vs, offset, period), vs => AdjustStartTime(vs + windowSize, offset, period) - AdjustStartTime(vs, offset, period)) .SetProperty().IsConstantHop(true, period, offset); + } } /// diff --git a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs index eb3e16c..b64fea4 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StreamableAPI/PivotExtensions.cs @@ -327,12 +327,14 @@ namespace Microsoft.StreamProcessing this.isNull.Add(field.Name, (TInput o) => true); } - var fieldAssignment = new[] { - Expression.Bind( - valueField.Member, - IsNullable(field.PropertyType) - ? Expression.PropertyOrField(Expression.PropertyOrField(input, field.Name), "Value") - : Expression.PropertyOrField(input, field.Name)) }; + var fieldAssignment = new[] + { + Expression.Bind( + valueField.Member, + IsNullable(field.PropertyType) + ? Expression.PropertyOrField(Expression.PropertyOrField(input, field.Name), "Value") + : Expression.PropertyOrField(input, field.Name)) + }; var constructor = Expression.MemberInit(newExpression, keyAssignments.Concat(fieldAssignment)); var fieldResult = Expression.Lambda>(constructor, input, attribute); this.fields.Add(field.Name, fieldResult.Compile()); @@ -361,12 +363,14 @@ namespace Microsoft.StreamProcessing this.isNull.Add(field.Name, (TInput o) => true); } - var fieldAssignment = new[] { - Expression.Bind( - valueField.Member, - IsNullable(field.FieldType) - ? Expression.PropertyOrField(Expression.PropertyOrField(input, field.Name), "Value") - : Expression.PropertyOrField(input, field.Name)) }; + var fieldAssignment = new[] + { + Expression.Bind( + valueField.Member, + IsNullable(field.FieldType) + ? Expression.PropertyOrField(Expression.PropertyOrField(input, field.Name), "Value") + : Expression.PropertyOrField(input, field.Name)) + }; var constructor = Expression.MemberInit(newExpression, keyAssignments.Concat(fieldAssignment)); var fieldResult = Expression.Lambda>(constructor, input, attribute); this.fields.Add(field.Name, fieldResult.Compile()); diff --git a/Sources/Core/Microsoft.StreamProcessing/StringHandling/MultiString.cs b/Sources/Core/Microsoft.StreamProcessing/StringHandling/MultiString.cs index 34c4462..dcfb3cf 100644 --- a/Sources/Core/Microsoft.StreamProcessing/StringHandling/MultiString.cs +++ b/Sources/Core/Microsoft.StreamProcessing/StringHandling/MultiString.cs @@ -708,9 +708,15 @@ namespace Microsoft.StreamProcessing.Internal.Collections var largestr = this.col.charArray.contentString; for (int i = 0; i < this.Count; i++) + { if ((bv[i >> 6] & (1L << (i & 0x3f))) == 0) + { if (!(largestr.IndexOf(str, startscol[i] + 2, lengthscol[i], StringComparison.Ordinal) >= 0)) + { rbv[i >> 6] |= (1L << (i & 0x3f)); + } + } + } return result; } diff --git a/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs b/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs index 79457fe..1cdfd3b 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Transformer/SelectTransformation.cs @@ -409,9 +409,9 @@ namespace Microsoft.StreamProcessing protected override Expression VisitMethodCall(MethodCallExpression node) { if (node.Object is ParameterExpression parameter) - if (!this.parameterInformation.ContainsKey(parameter)) - this.needsSourceInstance = true; - + { + if (!this.parameterInformation.ContainsKey(parameter)) this.needsSourceInstance = true; + } foreach (var a in node.Arguments) { parameter = a as ParameterExpression; diff --git a/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs b/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs index 257f563..3ef44aa 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Transformer/TemplateClasses.cs @@ -192,9 +192,11 @@ namespace Microsoft.StreamProcessing MetadataReference trill = MetadataReference.CreateFromFile(typeof(StreamMessage).GetTypeInfo().Assembly.Location); MetadataReference linq = MetadataReference.CreateFromFile(typeof(Enumerable).GetTypeInfo().Assembly.Location); MetadataReference contracts = MetadataReference.CreateFromFile(typeof(System.Runtime.Serialization.DataContractAttribute).GetTypeInfo().Assembly.Location); - MetadataReference[] baseReferences = { trill, + MetadataReference[] baseReferences = + { + trill, #if !DOTNETCORE - mscorlib, linq, contracts, numerics, + mscorlib, linq, contracts, numerics, #endif }; @@ -511,8 +513,9 @@ namespace System.Runtime.CompilerServices } if (!t.GetTypeInfo().Assembly.IsDynamic && t.GetTypeInfo().IsGenericType) - foreach (var gta in t.GenericTypeArguments) - l.AddRange(GenericTypeVariables(gta)); + { + foreach (var gta in t.GenericTypeArguments) l.AddRange(GenericTypeVariables(gta)); + } } return l.Distinct(); } @@ -599,8 +602,12 @@ namespace System.Runtime.CompilerServices if (!this.Fields.Any()) { if (t.HasSupportedParameterizedConstructor()) + { foreach (var p in t.GetTypeInfo().GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { d.Add(p.Name, new MyFieldInfo(p/*, prefix*/)); + } + } else { this.noFields = true; diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.cs index 2534c1a..85183fb 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.cs @@ -9,7 +9,8 @@ using System.Runtime.Serialization; namespace Microsoft.StreamProcessing.Internal { - internal static class StructTuple { + internal static class StructTuple + { public static StructTuple Create(T1 item1) { return new StructTuple() { Item1 = item1 }; diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.tt b/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.tt index b91634b..d561d70 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.tt +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/StructTupleTemplate.tt @@ -13,7 +13,8 @@ int maxSize = 16; namespace Microsoft.StreamProcessing.Internal { - internal static class StructTuple { + internal static class StructTuple + { <# for (int count = 1; count <= maxSize; count++) { diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/TransformerExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/TransformerExtensions.cs index 698ffa8..7756c5c 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/TransformerExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/TransformerExtensions.cs @@ -131,8 +131,9 @@ namespace Microsoft.StreamProcessing var n = f.Parameters.Count; var remainingParameters = new List(); for (int i = 0; i < n; i++) - if (i != j) - remainingParameters.Add(f.Parameters[i]); + { + if (i != j) remainingParameters.Add(f.Parameters[i]); + } return Expression.Lambda(newLambda.Body, remainingParameters); } diff --git a/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs b/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs index 97fae11..3445957 100644 --- a/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs +++ b/Sources/Core/Microsoft.StreamProcessing/Utilities/TypeExtensions.cs @@ -31,8 +31,11 @@ namespace Microsoft.StreamProcessing { "%d", "op_Modulus" }, }; - foreach (var pair in OperatorNameLookup) KnownSupportedOperators.Add( - pair.Key, new HashSet { typeof(long), typeof(ulong), typeof(int), typeof(uint), typeof(short), typeof(ushort), typeof(double), typeof(float), typeof(decimal), typeof(byte), typeof(sbyte) }); + foreach (var pair in OperatorNameLookup) + { + KnownSupportedOperators.Add( + pair.Key, new HashSet { typeof(long), typeof(ulong), typeof(int), typeof(uint), typeof(short), typeof(ushort), typeof(double), typeof(float), typeof(decimal), typeof(byte), typeof(sbyte) }); + } } public static PropertyInfo GetPropertyByName(this Type type, string name) diff --git a/Sources/Microsoft.StreamProcessing.ruleset b/Sources/Microsoft.StreamProcessing.ruleset index f87ecb4..cb4aa73 100644 --- a/Sources/Microsoft.StreamProcessing.ruleset +++ b/Sources/Microsoft.StreamProcessing.ruleset @@ -68,8 +68,11 @@ + + + @@ -122,7 +125,6 @@ - @@ -133,13 +135,11 @@ - - diff --git a/Sources/Test/SimpleTesting/AdHocTests.cs b/Sources/Test/SimpleTesting/AdHocTests.cs index 6e524a8..0d381a9 100644 --- a/Sources/Test/SimpleTesting/AdHocTests.cs +++ b/Sources/Test/SimpleTesting/AdHocTests.cs @@ -2238,14 +2238,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest5() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 2, 'a'), StreamEvent.CreateInterval(2, 3, 'a'), StreamEvent.CreateInterval(3, 4, 'b'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent>>[] { + var expectedOutput = new StreamEvent>>[] + { StreamEvent.CreateInterval(1, 2, new List> { new RankedEvent(1, 'a') }), StreamEvent.CreateInterval(2, 3, new List> { new RankedEvent(1, 'a') }), StreamEvent.CreateInterval(3, 4, new List> { new RankedEvent(1, 'b') }), diff --git a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs index faab0bc..e591c80 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs +++ b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.cs @@ -511,7 +511,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -521,7 +522,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -586,7 +588,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -596,7 +599,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -687,7 +691,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -697,7 +702,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -779,7 +785,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -789,7 +796,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -858,7 +866,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -868,7 +877,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -927,7 +937,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -937,7 +948,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -1022,7 +1034,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -1032,7 +1045,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -1108,7 +1122,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -1118,7 +1133,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -1173,7 +1189,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1198,7 +1215,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -1214,7 +1232,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1269,7 +1288,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1294,7 +1314,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -1314,7 +1335,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1368,7 +1390,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1393,7 +1416,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -1411,7 +1435,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1481,7 +1506,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1506,7 +1532,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -1541,7 +1568,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1593,7 +1621,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1618,7 +1647,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -1634,7 +1664,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1689,7 +1720,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1714,7 +1746,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -1734,7 +1767,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -1802,7 +1836,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -1812,14 +1847,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1844,7 +1881,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -1876,7 +1914,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -1886,14 +1925,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -1977,7 +2018,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -1987,14 +2029,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -2019,7 +2063,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -2068,7 +2113,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -2078,14 +2124,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -2602,7 +2650,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -2612,7 +2661,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -2681,7 +2731,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -2691,7 +2742,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -2783,7 +2835,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -2793,7 +2846,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -2879,7 +2933,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -2889,7 +2944,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -2958,7 +3014,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -2968,7 +3025,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3027,7 +3085,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -3037,7 +3096,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3122,7 +3182,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -3132,7 +3193,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3208,7 +3270,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -3218,7 +3281,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3732,7 +3796,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -3742,7 +3807,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3807,7 +3873,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -3817,7 +3884,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -3909,7 +3977,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -3919,7 +3988,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4001,7 +4071,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -4011,7 +4082,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4081,7 +4153,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -4091,7 +4164,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4150,7 +4224,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -4160,7 +4235,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4246,7 +4322,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -4256,7 +4333,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4332,7 +4410,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -4342,7 +4421,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -4398,7 +4478,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4423,7 +4504,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -4439,7 +4521,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4495,7 +4578,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4520,7 +4604,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -4540,7 +4625,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4595,7 +4681,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -4620,7 +4707,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -4638,7 +4726,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -4709,7 +4798,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -4734,7 +4824,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -4769,7 +4860,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -4822,7 +4914,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4847,7 +4940,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -4863,7 +4957,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4919,7 +5014,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -4944,7 +5040,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -4964,7 +5061,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -5033,7 +5131,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -5043,14 +5142,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -5075,7 +5176,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -5107,7 +5209,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -5117,14 +5220,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -5209,7 +5314,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -5219,14 +5325,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -5251,7 +5359,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -5300,7 +5409,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -5310,14 +5420,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -5839,7 +5951,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -5849,7 +5962,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -5918,7 +6032,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -5928,7 +6043,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6021,7 +6137,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -6031,7 +6148,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6117,7 +6235,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -6127,7 +6246,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6197,7 +6317,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -6207,7 +6328,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6266,7 +6388,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -6276,7 +6399,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6362,7 +6486,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -6372,7 +6497,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6448,7 +6574,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -6458,7 +6585,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -6967,7 +7095,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -6977,7 +7106,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7042,7 +7172,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -7052,7 +7183,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7143,7 +7275,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -7153,7 +7286,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7235,7 +7369,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -7245,7 +7380,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7314,7 +7450,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -7324,7 +7461,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7383,7 +7521,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -7393,7 +7532,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7478,7 +7618,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -7488,7 +7629,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7564,7 +7706,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -7574,7 +7717,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -7629,7 +7773,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7654,7 +7799,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -7670,7 +7816,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7725,7 +7872,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7750,7 +7898,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -7770,7 +7919,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -7824,7 +7974,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -7849,7 +8000,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -7867,7 +8019,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -7937,7 +8090,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -7962,7 +8116,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -7997,7 +8152,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -8049,7 +8205,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8074,7 +8231,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -8090,7 +8248,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8145,7 +8304,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8170,7 +8330,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -8190,7 +8351,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -8258,7 +8420,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -8268,14 +8431,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -8300,7 +8465,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -8332,7 +8498,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -8342,14 +8509,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -8433,7 +8602,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -8443,14 +8613,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -8475,7 +8647,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -8524,7 +8697,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -8534,14 +8708,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -9058,7 +9234,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -9068,7 +9245,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9137,7 +9315,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -9147,7 +9326,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9239,7 +9419,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -9249,7 +9430,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9335,7 +9517,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -9345,7 +9528,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9414,7 +9598,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -9424,7 +9609,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9483,7 +9669,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -9493,7 +9680,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9578,7 +9766,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -9588,7 +9777,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -9664,7 +9854,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -9674,7 +9865,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10188,7 +10380,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -10198,7 +10391,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10263,7 +10457,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -10273,7 +10468,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10365,7 +10561,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -10375,7 +10572,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10457,7 +10655,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -10467,7 +10666,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10537,7 +10737,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -10547,7 +10748,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10606,7 +10808,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -10616,7 +10819,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10702,7 +10906,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -10712,7 +10917,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10788,7 +10994,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -10798,7 +11005,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -10854,7 +11062,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -10879,7 +11088,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -10895,7 +11105,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -10951,7 +11162,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -10976,7 +11188,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -10996,7 +11209,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11051,7 +11265,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11076,7 +11291,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -11094,7 +11310,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11165,7 +11382,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11190,7 +11408,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -11225,7 +11444,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.IsTrue(!punctuations.Any()); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11278,7 +11498,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11303,7 +11524,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -11319,7 +11541,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11375,7 +11598,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11400,7 +11624,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(5), FlushPolicy.FlushOnPunctuation, @@ -11420,7 +11645,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress Assert.Fail("Expecting OutofOrderException"); } - catch(Exception) { + catch(Exception) + { Assert.IsTrue(true); // Todo. Verify if the ingress/egress before the exception was correct. } } @@ -11489,7 +11715,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -11499,14 +11726,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11531,7 +11760,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -11563,7 +11793,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -11573,14 +11804,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11665,7 +11898,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -11675,14 +11909,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -11707,7 +11943,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress .Select(t => new TestStruct { start = t, end = t + rand.Next(1, maxInterval) }) .ToList(); - try { + try + { var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, DisorderPolicy.Throw(20), FlushPolicy.FlushOnPunctuation, @@ -11756,7 +11993,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -11766,14 +12004,16 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } } Assert.IsTrue(punctuations.SequenceEqual(expectedPunctuations)); } - catch(Exception) { + catch(Exception) + { Assert.Fail("no exception should be thrown since disorder: 10 is always less than lag: 20."); } } @@ -12295,7 +12535,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -12305,7 +12546,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12374,7 +12616,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -12384,7 +12627,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12477,7 +12721,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -12487,7 +12732,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12573,7 +12819,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 5) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -12583,7 +12830,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12653,7 +12901,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -12663,7 +12912,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12722,7 +12972,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -12732,7 +12983,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12818,7 +13070,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -12828,7 +13081,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -12904,7 +13158,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Peek() <= highmark - 20) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -12914,7 +13169,8 @@ namespace SimpleTesting.DisorderedIngressAndEgress while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } diff --git a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.tt b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.tt index 2577121..2b2c928 100644 --- a/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.tt +++ b/Sources/Test/SimpleTesting/IngressEgress/DisorderedIngressAndEgressTests.tt @@ -171,7 +171,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) while (queue.Peek() <= highmark - <#= lag #>) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i, current); } @@ -181,7 +182,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -198,7 +200,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) { PopIndent(); #> } - catch(Exception) { + catch(Exception) + { <# if (dataDisorderAmount < lag) { #> Assert.Fail("no exception should be thrown since disorder: <#= dataDisorderAmount #> is always less than lag: <#= lag #>."); @@ -235,7 +238,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) <# if (disorder == "Throw") { #> - try { + try + { <# PushIndent(" "); } #> var ingress = disorderedInputData.ToObservable().ToTemporalStreamable(o => o.start, o => o.end, @@ -335,7 +339,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) while (queue.Peek() <= highmark - <#= lag #>) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; return Tuple.Create(i.start, current); } @@ -345,7 +350,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) while (queue.Count() > 0) { current = queue.Dequeue(); - if (current - lastPunc >= 10) { + if (current - lastPunc >= 10) + { lastPunc = current; expectedPunctuations.Add(StreamEvent.CreatePunctuation(((long)current).SnapToLeftBoundary(10))); } @@ -361,7 +367,8 @@ foreach (var diagnostic in new[] {string.Empty, "Diagnostic"}) { PopIndent(); #> } - catch(Exception) { + catch(Exception) + { <# if (dataDisorderAmount < lag) { #> Assert.Fail("no exception should be thrown since disorder: <#= dataDisorderAmount #> is always less than lag: <#= lag #>."); diff --git a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs index a3e150b..6b778f0 100644 --- a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs +++ b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.cs @@ -47,21 +47,24 @@ namespace SimpleTesting { var container = new QueryContainer(null); - var left = new StreamEvent[] { + var left = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "B" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "E" }) }; - var right = new StreamEvent[] { + var right = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "X" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 2, field4 = "Y" }) }; var output = new List>(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData3 { field1 = 2, field2 = "E", field3 = -1, field4 = "null" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "B", field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "A", field3 = 1, field4 = "W" }), @@ -106,21 +109,24 @@ namespace SimpleTesting { var container = new QueryContainer(null); - var left = new StreamEvent[] { + var left = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "B" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "E" }) }; - var right = new StreamEvent[] { + var right = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "X" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 2, field4 = "Y" }) }; var output = new List>(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData3 { field1 = 2, field2 = "E", field3 = -1, field4 = "null" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "B", field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "A", field3 = 1, field4 = "W" }), @@ -164,21 +170,24 @@ namespace SimpleTesting { var container = new QueryContainer(null); - var left = new StreamEvent[] { + var left = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "B" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "E" }) }; - var right = new StreamEvent[] { + var right = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "X" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 2, field4 = "Y" }) }; var output = new List>(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData3 { field1 = 2, field2 = "E", field3 = -1, field4 = "null" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "B", field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "A", field3 = 1, field4 = "W" }), @@ -223,21 +232,24 @@ namespace SimpleTesting { var container = new QueryContainer(null); - var left = new StreamEvent[] { + var left = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "B" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "E" }) }; - var right = new StreamEvent[] { + var right = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "X" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 2, field4 = "Y" }) }; var output = new List>(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData3 { field1 = 2, field2 = "E", field3 = -1, field4 = "null" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "B", field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "A", field3 = 1, field4 = "W" }), diff --git a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.tt b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.tt index 2d8c429..7826bfe 100644 --- a/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.tt +++ b/Sources/Test/SimpleTesting/Macros/LeftOuterJoinTests.tt @@ -71,21 +71,24 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) { var container = new QueryContainer(null); - var left = new StreamEvent[] { + var left = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(10, new MyData { field1 = 1, field2 = "B" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(10, new MyData { field1 = 2, field2 = "E" }) }; - var right = new StreamEvent[] { + var right = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 1, field4 = "X" }), StreamEvent.CreatePoint(10, new MyData2 { field3 = 2, field4 = "Y" }) }; var output = new List>(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreatePoint(10, new MyData3 { field1 = 2, field2 = "E", field3 = -1, field4 = "null" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "B", field3 = 1, field4 = "W" }), StreamEvent.CreatePoint(10, new MyData3 { field1 = 1, field2 = "A", field3 = 1, field4 = "W" }), diff --git a/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs b/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs index 8f68264..af8f600 100644 --- a/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs +++ b/Sources/Test/SimpleTesting/Partitioned/PartitionedStreamTests.cs @@ -716,7 +716,8 @@ namespace SimpleTesting public void AlterLifeTimeWithFlush() { var startDate = new DateTime(100); - var data = new[] { + var data = new[] + { new { Time = startDate, DeviceId = 4, Value = 4 }, new { Time = startDate, DeviceId = 6, Value = 6 }, new { Time = startDate.AddMinutes(1), DeviceId = 6, Value = 6 }, @@ -754,7 +755,8 @@ namespace SimpleTesting public void AlterLifeTimeWithFlushDoubles() { var startDate = new DateTime(100); - var data = new[] { + var data = new[] + { new { Time = startDate, DeviceId = 4, Value = 4 }, new { Time = startDate, DeviceId = 4, Value = 4 }, new { Time = startDate, DeviceId = 6, Value = 6 }, diff --git a/Sources/Test/SimpleTesting/Program.cs b/Sources/Test/SimpleTesting/Program.cs index 7e0df0c..75dfa5d 100644 --- a/Sources/Test/SimpleTesting/Program.cs +++ b/Sources/Test/SimpleTesting/Program.cs @@ -121,7 +121,8 @@ namespace SimpleTesting stream.GetProperties(out StreamProperties properties); if (!properties.IsStartEdgeOnly) { - var secondStream = new StreamEvent[] { + var secondStream = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MaxSyncTime, default(T)), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }.ToObservable().ToStreamable(); @@ -317,13 +318,6 @@ namespace SimpleTesting public StructWithCtor(int x) => this.f = x; } - public class ClassWithNoFieldsButWithPublicProperties - { - private int x; - public int X { get => this.x; set => this.x = value; } - - } - public abstract class TestWithConfigSettingsAndMemoryLeakDetection { private IDisposable confmod = null; diff --git a/Sources/Test/SimpleTesting/SimpleTests.cs b/Sources/Test/SimpleTesting/SimpleTests.cs index 3559179..1386c2e 100644 --- a/Sources/Test/SimpleTesting/SimpleTests.cs +++ b/Sources/Test/SimpleTesting/SimpleTests.cs @@ -18,7 +18,8 @@ namespace SimpleTesting { public static class ClassWithNestedType1 { - public class NestedType { + public class NestedType + { public T x; public U y; } @@ -26,7 +27,8 @@ namespace SimpleTesting public static class ClassWithNestedType2 { - public class NestedType { + public class NestedType + { public T x; public U y; } @@ -5871,14 +5873,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsRow() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -5895,7 +5899,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesRow() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -5906,7 +5911,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -5927,14 +5933,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsRow() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -5951,7 +5959,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesRow() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -5962,7 +5971,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -5983,14 +5993,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(20, 9, 'x'), @@ -6005,14 +6017,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(24, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -6027,14 +6041,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -6050,7 +6066,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy4Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), @@ -6066,7 +6083,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(30, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), @@ -6091,7 +6109,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -6103,7 +6122,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreatePunctuation(2), StreamEvent.CreateStart(2, 'b'), @@ -6128,13 +6148,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -6147,7 +6169,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3Row() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -6159,7 +6182,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -6543,7 +6567,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -6555,7 +6580,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -6575,7 +6601,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1Row() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -6589,7 +6616,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -6613,7 +6641,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -6625,7 +6654,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -6643,7 +6673,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3Row() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -6657,7 +6688,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -6729,7 +6761,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -6740,7 +6773,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -6756,7 +6790,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -6766,7 +6801,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -6782,7 +6818,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -6792,7 +6829,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -6808,14 +6846,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1Row() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -6823,7 +6863,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -6846,14 +6887,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2Row() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -6861,7 +6904,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -6925,7 +6969,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -6936,7 +6981,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -6956,7 +7002,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -7818,14 +7865,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsRowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -7842,7 +7891,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesRowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -7853,7 +7903,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -7874,14 +7925,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsRowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -7898,7 +7951,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesRowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -7909,7 +7963,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -7931,7 +7986,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -7943,7 +7999,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -7962,13 +8019,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -7981,7 +8040,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3RowFloating() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -7993,7 +8053,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -8375,7 +8436,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -8387,7 +8449,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -8407,7 +8470,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1RowFloating() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -8421,7 +8485,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -8445,7 +8510,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -8457,7 +8523,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -8475,7 +8542,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3RowFloating() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -8489,7 +8557,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -8561,7 +8630,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -8572,7 +8642,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -8588,7 +8659,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -8598,7 +8670,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -8614,7 +8687,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -8624,7 +8698,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -8640,14 +8715,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1RowFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -8655,7 +8732,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -8678,14 +8756,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2RowFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -8693,7 +8773,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -8757,7 +8838,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4RowFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -8768,7 +8850,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -8788,7 +8871,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -9650,14 +9734,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsRowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -9674,7 +9760,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesRowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -9685,7 +9772,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -9706,14 +9794,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsRowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -9730,7 +9820,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesRowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -9741,7 +9832,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -9762,14 +9854,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(20, 9, 'x'), @@ -9784,14 +9878,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(24, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -9806,14 +9902,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -9829,7 +9927,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy4RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), @@ -9845,7 +9944,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(30, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), @@ -9870,7 +9970,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -9882,7 +9983,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreatePunctuation(2), StreamEvent.CreateStart(2, 'b'), @@ -9907,13 +10009,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -9926,7 +10030,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3RowSmallBatch() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -9938,7 +10043,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -10322,7 +10428,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -10334,7 +10441,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -10354,7 +10462,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1RowSmallBatch() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -10368,7 +10477,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -10392,7 +10502,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -10404,7 +10515,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -10422,7 +10534,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3RowSmallBatch() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -10436,7 +10549,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -10508,7 +10622,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -10519,7 +10634,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -10535,7 +10651,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -10545,7 +10662,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -10561,7 +10679,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -10571,7 +10690,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -10587,14 +10707,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1RowSmallBatch() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -10602,7 +10724,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -10625,14 +10748,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2RowSmallBatch() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -10640,7 +10765,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -10704,7 +10830,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -10715,7 +10842,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -10735,7 +10863,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -11598,14 +11727,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsRowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -11622,7 +11753,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesRowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -11633,7 +11765,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -11654,14 +11787,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsRowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -11678,7 +11813,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesRowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -11689,7 +11825,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -11711,7 +11848,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -11723,7 +11861,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -11742,13 +11881,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -11761,7 +11902,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3RowSmallBatchFloating() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -11773,7 +11915,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -12155,7 +12298,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -12167,7 +12311,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -12187,7 +12332,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1RowSmallBatchFloating() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -12201,7 +12347,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -12225,7 +12372,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -12237,7 +12385,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -12255,7 +12404,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3RowSmallBatchFloating() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -12269,7 +12419,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -12341,7 +12492,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -12352,7 +12504,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -12368,7 +12521,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -12378,7 +12532,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -12394,7 +12549,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -12404,7 +12560,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -12420,14 +12577,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1RowSmallBatchFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -12435,7 +12594,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -12458,14 +12618,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2RowSmallBatchFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -12473,7 +12635,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -12537,7 +12700,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4RowSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -12548,7 +12712,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -12568,7 +12733,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -13429,14 +13595,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsColumnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -13453,7 +13621,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesColumnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -13464,7 +13633,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -13485,14 +13655,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsColumnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -13509,7 +13681,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesColumnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -13520,7 +13693,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -13541,14 +13715,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(20, 9, 'x'), @@ -13563,14 +13739,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(24, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -13585,14 +13763,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -13608,7 +13788,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy4Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), @@ -13624,7 +13805,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(30, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), @@ -13649,7 +13831,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -13661,7 +13844,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreatePunctuation(2), StreamEvent.CreateStart(2, 'b'), @@ -13686,13 +13870,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -13705,7 +13891,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3Columnar() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -13717,7 +13904,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -14101,7 +14289,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -14113,7 +14302,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -14133,7 +14323,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1Columnar() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -14147,7 +14338,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -14171,7 +14363,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -14183,7 +14376,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -14201,7 +14395,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3Columnar() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -14215,7 +14410,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -14287,7 +14483,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -14298,7 +14495,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -14314,7 +14512,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -14324,7 +14523,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -14340,7 +14540,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -14350,7 +14551,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -14366,14 +14568,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1Columnar() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -14381,7 +14585,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -14404,14 +14609,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2Columnar() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -14419,7 +14626,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -14483,7 +14691,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -14494,7 +14703,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -14514,7 +14724,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -15376,14 +15587,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -15400,7 +15613,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -15411,7 +15625,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -15432,14 +15647,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -15456,7 +15673,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -15467,7 +15685,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -15489,7 +15708,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -15501,7 +15721,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -15520,13 +15741,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -15539,7 +15762,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3ColumnarFloating() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -15551,7 +15775,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -15933,7 +16158,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -15945,7 +16171,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -15965,7 +16192,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1ColumnarFloating() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -15979,7 +16207,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -16003,7 +16232,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -16015,7 +16245,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -16033,7 +16264,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3ColumnarFloating() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -16047,7 +16279,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -16119,7 +16352,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -16130,7 +16364,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -16146,7 +16381,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -16156,7 +16392,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -16172,7 +16409,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -16182,7 +16420,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -16198,14 +16437,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1ColumnarFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -16213,7 +16454,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -16236,14 +16478,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2ColumnarFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -16251,7 +16495,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -16315,7 +16560,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4ColumnarFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -16326,7 +16572,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -16346,7 +16593,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -17208,14 +17456,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -17232,7 +17482,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -17243,7 +17494,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -17264,14 +17516,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -17288,7 +17542,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -17299,7 +17554,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -17320,14 +17576,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(20, 9, 'x'), @@ -17342,14 +17600,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(24, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -17364,14 +17624,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -17387,7 +17649,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void DisorderPolicy4ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), @@ -17403,7 +17666,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(30, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), @@ -17428,7 +17692,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -17440,7 +17705,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreatePunctuation(2), StreamEvent.CreateStart(2, 'b'), @@ -17465,13 +17731,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -17484,7 +17752,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3ColumnarSmallBatch() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -17496,7 +17765,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -17880,7 +18150,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -17892,7 +18163,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -17912,7 +18184,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1ColumnarSmallBatch() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -17926,7 +18199,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -17950,7 +18224,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -17962,7 +18237,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -17980,7 +18256,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3ColumnarSmallBatch() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -17994,7 +18271,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -18066,7 +18344,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -18077,7 +18356,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -18093,7 +18373,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -18103,7 +18384,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -18119,7 +18401,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -18129,7 +18412,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -18145,14 +18429,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1ColumnarSmallBatch() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -18160,7 +18446,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -18183,14 +18470,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2ColumnarSmallBatch() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -18198,7 +18487,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -18262,7 +18552,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -18273,7 +18564,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -18293,7 +18585,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), @@ -19156,14 +19449,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervalsColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -19180,7 +19475,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdgesColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19191,7 +19487,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19212,14 +19509,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervalsColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -19236,7 +19535,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdgesColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19247,7 +19547,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -19269,7 +19570,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -19281,7 +19583,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -19300,13 +19603,15 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AlterDurationTest1ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -19319,7 +19624,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3ColumnarSmallBatchFloating() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -19331,7 +19637,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -19713,7 +20020,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void CountColumnar1ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -19725,7 +20033,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -19745,7 +20054,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar1ColumnarSmallBatchFloating() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -19759,7 +20069,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -19783,7 +20094,8 @@ namespace SimpleTesting var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -19795,7 +20107,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -19813,7 +20126,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void AverageColumnar3ColumnarSmallBatchFloating() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -19827,7 +20141,8 @@ namespace SimpleTesting StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -19899,7 +20214,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19910,7 +20226,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -19926,7 +20243,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19936,7 +20254,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -19952,7 +20271,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -19962,7 +20282,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -19978,14 +20299,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1ColumnarSmallBatchFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -19993,7 +20316,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -20016,14 +20340,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2ColumnarSmallBatchFloating() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -20031,7 +20357,8 @@ namespace SimpleTesting StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -20095,7 +20422,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4ColumnarSmallBatchFloating() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -20106,7 +20434,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -20126,7 +20455,8 @@ namespace SimpleTesting var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), diff --git a/Sources/Test/SimpleTesting/SimpleTests.tt b/Sources/Test/SimpleTesting/SimpleTests.tt index 46fd223..aede7e1 100644 --- a/Sources/Test/SimpleTesting/SimpleTests.tt +++ b/Sources/Test/SimpleTesting/SimpleTests.tt @@ -24,7 +24,8 @@ namespace SimpleTesting { public static class ClassWithNestedType1 { - public class NestedType { + public class NestedType + { public T x; public U y; } @@ -32,7 +33,8 @@ namespace SimpleTesting public static class ClassWithNestedType2 { - public class NestedType { + public class NestedType + { public T x; public U y; } @@ -897,14 +899,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpIntervals<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), StreamEvent.CreateInterval(4, 8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(2, 6, 'b'), StreamEvent.CreateInterval(3, 7, 'c'), @@ -921,7 +925,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ClipByConstantNoOpEdges<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -932,7 +937,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -953,14 +959,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedIntervals<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 15, 'a'), StreamEvent.CreateInterval(2, 16, 'b'), StreamEvent.CreateInterval(3, 17, 'c'), StreamEvent.CreateInterval(4, 18, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 11, 'a'), StreamEvent.CreateInterval(2, 12, 'b'), StreamEvent.CreateInterval(3, 13, 'c'), @@ -977,7 +985,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ClipByConstantClippedEdges<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -988,7 +997,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(8, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateEnd(3, 1, 'a'), @@ -1010,14 +1020,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void DisorderPolicy1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(20, 9, 'x'), @@ -1032,14 +1044,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void DisorderPolicy2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(24, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -1054,14 +1068,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void DisorderPolicy3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), StreamEvent.CreateEnd(20, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), StreamEvent.CreateEnd(22, 9, 'y'), @@ -1077,7 +1093,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void DisorderPolicy4<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(5, 'x'), @@ -1093,7 +1110,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(30, 5, 'x'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(5, 'x'), StreamEvent.CreateStart(9, 'y'), StreamEvent.CreateStart(9, 'x'), @@ -1119,7 +1137,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void PunctuationPolicy2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(4, 'c'), @@ -1131,7 +1150,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), <# if (string.IsNullOrEmpty(disorderPolicy)) { #> StreamEvent.CreatePunctuation(2), @@ -1168,13 +1188,15 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void AlterDurationTest1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(3, 'x'), StreamEvent.CreateEnd(5, 3, 'x'), StreamEvent.CreateStart(7, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(3, 8, 'x'), StreamEvent.CreateInterval(7, 12, 'y'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), @@ -1187,7 +1209,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void PunctuationPolicy3<#= suffix #>() { // Simulates the way Stat does ingress (but with 80K batches, not 3...) - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -1199,7 +1222,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -1587,7 +1611,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void CountColumnar1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), @@ -1599,7 +1624,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 3), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 3), @@ -1619,7 +1645,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void AverageColumnar1<#= suffix #>() // tests codegen for Snapshot_noecq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -1633,7 +1660,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -1657,7 +1685,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) var one = StreamEvent.MinSyncTime + 1; var two = StreamEvent.MinSyncTime + 2; var three = StreamEvent.MinSyncTime + 3; - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 'a'), StreamEvent.CreateInterval(zero, one, 'b'), StreamEvent.CreateInterval(zero, one, 'c'), @@ -1669,7 +1698,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateInterval(two, three, 'i'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(zero, one, 98.0), StreamEvent.CreatePunctuation(one), StreamEvent.CreateInterval(one, two, 101.0), @@ -1687,7 +1717,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void AverageColumnar3<#= suffix #>() // tests codegen for Snapshot_pq { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'a'), // 97 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'b'), // 98 StreamEvent.CreateStart(StreamEvent.MinSyncTime, 'c'), // 99 running average = 98 @@ -1701,7 +1732,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateStart(StreamEvent.MinSyncTime + 2, 'i'), // 105 running average = 101 StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateStart(StreamEvent.MinSyncTime, 98.0), StreamEvent.CreatePunctuation(StreamEvent.MinSyncTime + 1), StreamEvent.CreateEnd(StreamEvent.MinSyncTime + 1, StreamEvent.MinSyncTime, 98.0), @@ -1773,7 +1805,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -1784,7 +1817,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -1800,7 +1834,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -1810,7 +1845,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(26, 4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateInterval(3, 24, 'c'), @@ -1826,7 +1862,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -1836,7 +1873,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(26, 3, 'c'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateInterval(2, 22, 'b'), StreamEvent.CreateInterval(3, 26, 'c'), @@ -1852,14 +1890,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void BinaryUnionTest1<#= suffix #>() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateStart(4, 'b'), StreamEvent.CreateStart(6, 'c'), StreamEvent.CreateStart(8, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(5, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -1867,7 +1907,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(2, 20, 'a'), StreamEvent.CreateInterval(3, 20, 'a'), StreamEvent.CreateStart(4, 'b'), @@ -1890,14 +1931,16 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void BinaryUnionTest2<#= suffix #>() { - var input1 = new StreamEvent[] { + var input1 = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), StreamEvent.CreateStart(4, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var input2 = new StreamEvent[] { + var input2 = new StreamEvent[] + { StreamEvent.CreateInterval(5, 20, 'a'), StreamEvent.CreateStart(6, 'b'), StreamEvent.CreateStart(7, 'c'), @@ -1905,7 +1948,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 20, 'a'), StreamEvent.CreateStart(2, 'b'), StreamEvent.CreateStart(3, 'c'), @@ -1969,7 +2013,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) [TestMethod, TestCategory("Gated")] public void ToEndEdgeFreeTest4<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreateStart(1, 'a'), StreamEvent.CreateEnd(5, 1, 'a'), StreamEvent.CreateStart(6, 'b'), @@ -1980,7 +2025,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) StreamEvent.CreateEnd(20, 16, 'd'), StreamEvent.CreatePunctuation(StreamEvent.InfinitySyncTime), }; - var expectedOutput = new StreamEvent[] { + var expectedOutput = new StreamEvent[] + { StreamEvent.CreateInterval(1, 5, 'a'), StreamEvent.CreateInterval(6, 10, 'b'), StreamEvent.CreateInterval(11, 15, 'c'), @@ -2000,7 +2046,8 @@ foreach (var disorderPolicy in (new [] { string.Empty, "Floating" })) var stream = Events().ToEvents(e => e.Vs.Ticks, e => e.Vs.Ticks + threeSecondTicks) .ToObservable() .ToStreamable(DisorderPolicy.Adjust(), FlushPolicy.FlushOnPunctuation, PeriodicPunctuationPolicy.None()); - var expectedResult = new StreamEvent[] { + var expectedResult = new StreamEvent[] + { StreamEvent.CreateStart(633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateEnd(633979008020000000, 633979008010000000, new ResultEvent { Key = 1, Cnt = 1 }), StreamEvent.CreateStart(633979008020000000, new ResultEvent { Key = 1, Cnt = 2 }), diff --git a/Sources/Test/SimpleTesting/SnapshotTests.cs b/Sources/Test/SimpleTesting/SnapshotTests.cs index cf4e4ba..724cfd0 100644 --- a/Sources/Test/SimpleTesting/SnapshotTests.cs +++ b/Sources/Test/SimpleTesting/SnapshotTests.cs @@ -22,14 +22,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "D" }) }; @@ -46,14 +48,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "A" }) @@ -72,14 +76,16 @@ namespace SimpleTesting public void TumblingSnapshot3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "A" }) @@ -97,14 +103,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot4Row() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 4), }; @@ -122,14 +130,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 4, field2 = "D" }) }; @@ -146,14 +156,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "A" }), @@ -173,14 +185,16 @@ namespace SimpleTesting public void HoppingSnapshot3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "D" }) @@ -198,14 +212,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot4Row() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 6), StreamEvent.CreateInterval(40, 50, 4), @@ -224,14 +240,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -251,14 +269,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -278,7 +298,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -289,7 +310,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -313,7 +335,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot4Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -328,7 +351,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -356,7 +380,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot5Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(0, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(5, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), @@ -373,7 +398,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(0, 5, 1), StreamEvent.CreateInterval(5, 11, 3), StreamEvent.CreateInterval(11, 12, 4), @@ -403,14 +429,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -428,14 +456,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -453,7 +483,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -464,7 +495,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -486,7 +518,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup4Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -501,7 +534,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -527,14 +561,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup1Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 71, new MyData { field1 = 4, field2 = "A" }), @@ -552,14 +588,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup2Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 18, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 27, new MyData { field1 = 2, field2 = "A" }), @@ -577,7 +615,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup3Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -588,7 +627,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -610,7 +650,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup4Row() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -625,7 +666,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -663,14 +705,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "D" }) }; @@ -687,14 +731,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "A" }) @@ -713,14 +759,16 @@ namespace SimpleTesting public void TumblingSnapshot3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "A" }) @@ -738,14 +786,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot4RowSmallBatch() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 4), }; @@ -763,14 +813,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 4, field2 = "D" }) }; @@ -787,14 +839,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "A" }), @@ -814,14 +868,16 @@ namespace SimpleTesting public void HoppingSnapshot3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "D" }) @@ -839,14 +895,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot4RowSmallBatch() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 6), StreamEvent.CreateInterval(40, 50, 4), @@ -865,14 +923,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -892,14 +952,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -919,7 +981,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -930,7 +993,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -954,7 +1018,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot4RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -969,7 +1034,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -997,7 +1063,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot5RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(0, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(5, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), @@ -1014,7 +1081,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(0, 5, 1), StreamEvent.CreateInterval(5, 11, 3), StreamEvent.CreateInterval(11, 12, 4), @@ -1044,14 +1112,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1069,14 +1139,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -1094,7 +1166,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1105,7 +1178,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1127,7 +1201,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup4RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1142,7 +1217,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1168,14 +1244,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup1RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 71, new MyData { field1 = 4, field2 = "A" }), @@ -1193,14 +1271,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup2RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 18, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 27, new MyData { field1 = 2, field2 = "A" }), @@ -1218,7 +1298,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup3RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1229,7 +1310,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -1251,7 +1333,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup4RowSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1266,7 +1349,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -1303,14 +1387,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "D" }) }; @@ -1327,14 +1413,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "A" }) @@ -1353,14 +1441,16 @@ namespace SimpleTesting public void TumblingSnapshot3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "A" }) @@ -1378,14 +1468,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot4Columnar() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 4), }; @@ -1403,14 +1495,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 4, field2 = "D" }) }; @@ -1427,14 +1521,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "A" }), @@ -1454,14 +1550,16 @@ namespace SimpleTesting public void HoppingSnapshot3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "D" }) @@ -1479,14 +1577,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot4Columnar() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 6), StreamEvent.CreateInterval(40, 50, 4), @@ -1505,14 +1605,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1532,14 +1634,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -1559,7 +1663,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1570,7 +1675,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1594,7 +1700,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot4Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1609,7 +1716,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1637,7 +1745,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot5Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(0, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(5, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), @@ -1654,7 +1763,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(0, 5, 1), StreamEvent.CreateInterval(5, 11, 3), StreamEvent.CreateInterval(11, 12, 4), @@ -1684,14 +1794,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1709,14 +1821,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -1734,7 +1848,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1745,7 +1860,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1767,7 +1883,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup4Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1782,7 +1899,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -1808,14 +1926,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup1Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 71, new MyData { field1 = 4, field2 = "A" }), @@ -1833,14 +1953,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup2Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 18, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 27, new MyData { field1 = 2, field2 = "A" }), @@ -1858,7 +1980,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup3Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1869,7 +1992,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -1891,7 +2015,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup4Columnar() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -1906,7 +2031,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -1944,14 +2070,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "D" }) }; @@ -1968,14 +2096,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "A" }) @@ -1994,14 +2124,16 @@ namespace SimpleTesting public void TumblingSnapshot3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "A" }) @@ -2019,14 +2151,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void TumblingSnapshot4ColumnarSmallBatch() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 4), }; @@ -2044,14 +2178,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 4, field2 = "D" }) }; @@ -2068,14 +2204,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "A" }), @@ -2095,14 +2233,16 @@ namespace SimpleTesting public void HoppingSnapshot3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "D" }) @@ -2120,14 +2260,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void HoppingSnapshot4ColumnarSmallBatch() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 6), StreamEvent.CreateInterval(40, 50, 4), @@ -2146,14 +2288,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2173,14 +2317,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -2200,7 +2346,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2211,7 +2358,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2235,7 +2383,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot4ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2250,7 +2399,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2278,7 +2428,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshot5ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(0, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(5, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), @@ -2295,7 +2446,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(0, 5, 1), StreamEvent.CreateInterval(5, 11, 3), StreamEvent.CreateInterval(11, 12, 4), @@ -2325,14 +2477,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2350,14 +2504,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -2375,7 +2531,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2386,7 +2543,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2408,7 +2566,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup4ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2423,7 +2582,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -2449,14 +2609,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup1ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 71, new MyData { field1 = 4, field2 = "A" }), @@ -2474,14 +2636,16 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup2ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 18, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 27, new MyData { field1 = 2, field2 = "A" }), @@ -2499,7 +2663,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup3ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2510,7 +2675,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -2532,7 +2698,8 @@ namespace SimpleTesting [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup4ColumnarSmallBatch() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -2547,7 +2714,8 @@ namespace SimpleTesting StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), diff --git a/Sources/Test/SimpleTesting/SnapshotTests.tt b/Sources/Test/SimpleTesting/SnapshotTests.tt index 246e72f..8464fa0 100644 --- a/Sources/Test/SimpleTesting/SnapshotTests.tt +++ b/Sources/Test/SimpleTesting/SnapshotTests.tt @@ -46,14 +46,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void TumblingSnapshot1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "D" }) }; @@ -70,14 +72,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void TumblingSnapshot2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 2, field2 = "A" }) @@ -96,14 +100,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) public void TumblingSnapshot3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(50, 60, new MyData { field1 = 2, field2 = "A" }) @@ -121,14 +127,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void TumblingSnapshot4<#= suffix #>() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 4), }; @@ -146,14 +154,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void HoppingSnapshot1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 4, field2 = "D" }) }; @@ -170,14 +180,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void HoppingSnapshot2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(30, 50, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreateInterval(30, 40, new MyData { field1 = 4, field2 = "A" }), @@ -197,14 +209,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) public void HoppingSnapshot3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(41, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 40, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(50, 70, new MyData { field1 = 2, field2 = "D" }) @@ -222,14 +236,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void HoppingSnapshot4<#= suffix #>() // like 2, but without grouping { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(20, 30, 2), StreamEvent.CreateInterval(30, 40, 6), StreamEvent.CreateInterval(40, 50, 4), @@ -248,14 +264,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshot1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -275,14 +293,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshot2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -302,7 +322,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshot3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -313,7 +334,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -337,7 +359,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshot4<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -352,7 +375,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -380,7 +404,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshot5<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(0, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(5, new MyData { field1 = 2, field2 = "D" }), StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), @@ -397,7 +422,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(0, 5, 1), StreamEvent.CreateInterval(5, 11, 3), StreamEvent.CreateInterval(11, 12, 4), @@ -427,14 +453,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -452,14 +480,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 18, 2), StreamEvent.CreateInterval(21, 25, 2), @@ -477,7 +507,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -488,7 +519,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -510,7 +542,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotTrivialGroup4<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -525,7 +558,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, 1), StreamEvent.CreateInterval(12, 21, 2), StreamEvent.CreateInterval(21, 25, 4), @@ -551,14 +585,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup1<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 71, new MyData { field1 = 4, field2 = "A" }), @@ -576,14 +612,16 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup2<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreatePoint(25, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 18, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 27, new MyData { field1 = 2, field2 = "A" }), @@ -601,7 +639,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup3<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -612,7 +651,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(45, new MyData { field1 = 2, field2 = "D" }) }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), @@ -634,7 +674,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) [TestMethod, TestCategory("Gated")] public void SessionSnapshotSimpleGroup4<#= suffix #>() { - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(11, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreatePoint(21, new MyData { field1 = 2, field2 = "A" }), @@ -649,7 +690,8 @@ foreach (var batch in new [] { string.Empty, "SmallBatch" }) StreamEvent.CreatePoint(75, new MyData { field1 = 2, field2 = "D" }), }; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(11, 12, new MyData { field1 = 1, field2 = "A" }), StreamEvent.CreateInterval(12, 21, new MyData { field1 = 2, field2 = "A" }), StreamEvent.CreateInterval(21, 31, new MyData { field1 = 4, field2 = "A" }), diff --git a/Sources/Test/SimpleTesting/Streamables/AfaTests.cs b/Sources/Test/SimpleTesting/Streamables/AfaTests.cs index 1a470c5..6a33d85 100644 --- a/Sources/Test/SimpleTesting/Streamables/AfaTests.cs +++ b/Sources/Test/SimpleTesting/Streamables/AfaTests.cs @@ -110,7 +110,8 @@ namespace SimpleTesting .Where(e => e.IsData) .ToEnumerable() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(2, 10, Empty.Default), }; Assert.IsTrue(result.SequenceEqual(expected)); @@ -123,11 +124,12 @@ namespace SimpleTesting pat1.AddListElementArc(1, 1, fence: (ts, events, reg) => !events.Any(p => p.Field2 == 1)); pat1.AddListElementArc(1, 2, fence: (ts, events, reg) => events.Any(p => p.Field2 == 1)); - var input = new StreamEvent[] { + var input = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 0 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "C", Field2 = 0 }), StreamEvent.CreatePoint(140, new AfaPayload { Field1 = "B", Field2 = 1 }), - }; + }; var result = input .ToObservable() .ToStreamable() @@ -138,7 +140,8 @@ namespace SimpleTesting .Where(e => e.IsData) .ToEnumerable() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(140, 1100, Empty.Default), }; Assert.IsTrue(result.SequenceEqual(expected)); @@ -175,7 +178,8 @@ namespace SimpleTesting .ToEnumerable() .ToArray() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(2, 10, Empty.Default), }; Assert.IsTrue(result.SequenceEqual(expected)); @@ -200,8 +204,7 @@ namespace SimpleTesting fence: (ts, acc, reg) => acc); var result = - new Tuple[] { - Tuple.Create(0, 0), Tuple.Create(0, 0), Tuple.Create(1, 1), } + new Tuple[] { Tuple.Create(0, 0), Tuple.Create(0, 0), Tuple.Create(1, 1) } .Select(e => StreamEvent.CreatePoint(e.Item1, e.Item2)) .ToObservable() .ToStreamable() @@ -213,9 +216,7 @@ namespace SimpleTesting .ToEnumerable() ; var x = result.ToArray(); - var expected = new StreamEvent[] { - StreamEvent.CreateInterval(1, 10, Empty.Default), - }; + var expected = new StreamEvent[] { StreamEvent.CreateInterval(1, 10, Empty.Default) }; Assert.IsTrue(result.SequenceEqual(expected)); } @@ -257,9 +258,7 @@ namespace SimpleTesting .ToEnumerable() .ToArray() ; - var expected = new StreamEvent[] { - StreamEvent.CreateInterval(3, 11, Empty.Default), - }; + var expected = new StreamEvent[] { StreamEvent.CreateInterval(3, 11, Empty.Default) }; Assert.IsTrue(result.SequenceEqual(expected)); } @@ -299,15 +298,14 @@ namespace SimpleTesting .ToEnumerable() .ToArray() ; - var expected = new StreamEvent[] { - StreamEvent.CreateInterval(3, 11, Empty.Default), - }; + var expected = new StreamEvent[] { StreamEvent.CreateInterval(3, 11, Empty.Default) }; Assert.IsTrue(result.SequenceEqual(expected)); } public static void AfaDefinePattern01() { - var source1 = new StreamEvent[] { + var source1 = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 4 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "C", Field2 = 3 }), StreamEvent.CreatePoint(120, new AfaPayload { Field1 = "A", Field2 = 1 }), @@ -329,7 +327,8 @@ namespace SimpleTesting .ToEnumerable() .ToArray(); - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(110, 1100, 0), StreamEvent.CreateInterval(150, 1120, 14), }; @@ -339,7 +338,8 @@ namespace SimpleTesting public static void AfaDefinePattern02() { - var source1 = new StreamEvent[] { + var source1 = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 4 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "C", Field2 = 3 }), StreamEvent.CreatePoint(120, new AfaPayload { Field1 = "A", Field2 = 1 }), @@ -361,7 +361,8 @@ namespace SimpleTesting .ToArray() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(110, 1100, 0), StreamEvent.CreateInterval(150, 1120, 14), }; @@ -371,7 +372,8 @@ namespace SimpleTesting public static void AfaDefinePattern03() { - var source1 = new StreamEvent[] { + var source1 = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 4 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "C", Field2 = 3 }), StreamEvent.CreatePoint(120, new AfaPayload { Field1 = "A", Field2 = 1 }), @@ -392,7 +394,8 @@ namespace SimpleTesting .ToArray() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(110, 1100, 17), }; Assert.IsTrue(result.SequenceEqual(expected)); @@ -401,7 +404,8 @@ namespace SimpleTesting public static void AfaPatternAiBi01() { - var source1 = new StreamEvent[] { + var source1 = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 4 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "A", Field2 = 3 }), StreamEvent.CreatePoint(120, new AfaPayload { Field1 = "A", Field2 = 1 }), @@ -421,7 +425,8 @@ namespace SimpleTesting .ToEnumerable() .ToArray() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(130, 1120, 1), StreamEvent.CreateInterval(140, 1110, 1), StreamEvent.CreateInterval(150, 1100, 1), @@ -431,7 +436,8 @@ namespace SimpleTesting public static void AfaPatternAiBi02() { - var source1 = new StreamEvent[] { + var source1 = new StreamEvent[] + { StreamEvent.CreatePoint(100, new AfaPayload { Field1 = "A", Field2 = 4 }), StreamEvent.CreatePoint(110, new AfaPayload { Field1 = "A", Field2 = 3 }), StreamEvent.CreatePoint(120, new AfaPayload { Field1 = "A", Field2 = 1 }), @@ -452,7 +458,8 @@ namespace SimpleTesting .ToEnumerable() .ToArray() ; - var expected = new StreamEvent[] { + var expected = new StreamEvent[] + { StreamEvent.CreateInterval(150, 1100, 1), }; Assert.IsTrue(result.SequenceEqual(expected)); diff --git a/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs b/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs index 2cc2dac..9741493 100644 --- a/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/ExtendLifetimeTest.cs @@ -23,7 +23,8 @@ namespace SimpleTesting public void ExtendTest1() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -34,7 +35,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "A"), StreamEvent.CreateStart(3, "A"), @@ -67,7 +69,8 @@ namespace SimpleTesting public void ExtendTest2() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 5, "A"), StreamEvent.CreateInterval(2, 10, "A"), StreamEvent.CreateInterval(3, 8, "A"), @@ -75,7 +78,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 9, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateInterval(1, 15, "A"), StreamEvent.CreateInterval(2, 20, "A"), StreamEvent.CreateInterval(3, 18, "A"), @@ -98,7 +102,8 @@ namespace SimpleTesting { var payload = StructTuple.Create("A", 3); // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 5, payload), StreamEvent.CreateInterval(2, 10, payload), StreamEvent.CreateInterval(3, 8, payload), @@ -106,7 +111,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 9, payload), }; - var compareTo = new StreamEvent>[] { + var compareTo = new StreamEvent>[] + { StreamEvent.CreateInterval(1, 15, payload), StreamEvent.CreateInterval(2, 20, payload), StreamEvent.CreateInterval(3, 18, payload), @@ -125,7 +131,8 @@ namespace SimpleTesting public void ExtendTestNegative1() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "A"), StreamEvent.CreateStart(3, "A"), @@ -136,7 +143,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(8, 4, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -158,7 +166,8 @@ namespace SimpleTesting public void ExtendTestNegative2() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 15, "A"), StreamEvent.CreateInterval(2, 20, "A"), StreamEvent.CreateInterval(3, 18, "A"), @@ -166,7 +175,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 19, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateInterval(1, 5, "A"), StreamEvent.CreateInterval(2, 10, "A"), StreamEvent.CreateInterval(3, 8, "A"), @@ -185,7 +195,8 @@ namespace SimpleTesting public void ExtendTestNegative3() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "A"), StreamEvent.CreateStart(3, "A"), @@ -196,7 +207,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(18, 4, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(3, "A"), StreamEvent.CreateStart(4, "A"), StreamEvent.CreateEnd(7, 3, "A"), @@ -214,7 +226,8 @@ namespace SimpleTesting public void ExtendTestNegative4() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 15, "A"), StreamEvent.CreateInterval(2, 20, "A"), StreamEvent.CreateInterval(3, 18, "A"), @@ -222,7 +235,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 19, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateInterval(2, 5, "A"), END }; @@ -241,7 +255,8 @@ namespace SimpleTesting { var payload = StructTuple.Create("A", 3); // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 15, payload), StreamEvent.CreateInterval(2, 20, payload), StreamEvent.CreateInterval(3, 18, payload), @@ -249,7 +264,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 19, payload), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateInterval(2, 5, payload), END2 }; diff --git a/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs b/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs index c856627..b7180e9 100644 --- a/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/PointAtEndTest.cs @@ -23,7 +23,8 @@ namespace SimpleTesting public void PointAtEndTest1() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -34,7 +35,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreatePoint(2, "A"), StreamEvent.CreatePoint(3, "A"), StreamEvent.CreatePoint(4, "A"), @@ -52,7 +54,8 @@ namespace SimpleTesting public void PointAtEndTest2() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 5, "A"), StreamEvent.CreateInterval(2, 10, "A"), StreamEvent.CreateInterval(3, 8, "A"), @@ -60,7 +63,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 9, "A"), }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreatePoint(5, "A"), StreamEvent.CreatePoint(6, "A"), StreamEvent.CreatePoint(8, "A"), @@ -88,7 +92,8 @@ namespace SimpleTesting public void PointAtEndTest3() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -99,7 +104,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreatePoint(101, "A"), StreamEvent.CreatePoint(102, "A"), StreamEvent.CreatePoint(103, "A"), @@ -122,7 +128,8 @@ namespace SimpleTesting { var payload = StructTuple.Create("A", 3); // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, payload), StreamEvent.CreateEnd(2, 1, payload), StreamEvent.CreateStart(2, payload), @@ -133,7 +140,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, payload) }; - var compareTo = new StreamEvent>[] { + var compareTo = new StreamEvent>[] + { StreamEvent.CreatePoint(2, payload), StreamEvent.CreatePoint(3, payload), StreamEvent.CreatePoint(4, payload), @@ -155,7 +163,8 @@ namespace SimpleTesting { var payload = StructTuple.Create("A", 3); // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateInterval(1, 5, payload), StreamEvent.CreateInterval(2, 10, payload), StreamEvent.CreateInterval(3, 8, payload), @@ -163,7 +172,8 @@ namespace SimpleTesting StreamEvent.CreateInterval(8, 9, payload), }; - var compareTo = new StreamEvent>[] { + var compareTo = new StreamEvent>[] + { StreamEvent.CreatePoint(5, payload), StreamEvent.CreatePoint(6, payload), StreamEvent.CreatePoint(8, payload), @@ -186,7 +196,8 @@ namespace SimpleTesting { var payload = StructTuple.Create("A", 3); // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, payload), StreamEvent.CreateEnd(2, 1, payload), StreamEvent.CreateStart(2, payload), @@ -197,7 +208,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, payload) }; - var compareTo = new StreamEvent>[] { + var compareTo = new StreamEvent>[] + { StreamEvent.CreatePoint(101, payload), StreamEvent.CreatePoint(102, payload), StreamEvent.CreatePoint(103, payload), diff --git a/Sources/Test/SimpleTesting/Streamables/StitchTest.cs b/Sources/Test/SimpleTesting/Streamables/StitchTest.cs index e102b9b..821dcd2 100644 --- a/Sources/Test/SimpleTesting/Streamables/StitchTest.cs +++ b/Sources/Test/SimpleTesting/Streamables/StitchTest.cs @@ -24,7 +24,8 @@ namespace SimpleTesting public static void StitchTestMultisetMultiStart() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "A"), StreamEvent.CreateEnd(3, 2, "A"), @@ -36,7 +37,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(7, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "A"), StreamEvent.CreateEnd(6, 1, "A"), // 6->5->1 @@ -64,7 +66,8 @@ namespace SimpleTesting var input = inputList.ToObservable().ToStreamable(); var outputStream = input.Stitch(); - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(2, "B"), StreamEvent.CreateEnd(3, 1, "A"), @@ -79,7 +82,8 @@ namespace SimpleTesting public void StitchTestSimpleSplice() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -90,7 +94,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(5, 1, "A"), END @@ -106,7 +111,8 @@ namespace SimpleTesting public void StitchTestMultisetOneStart() { // Two different start times - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), @@ -119,7 +125,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(6, 1, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(5, 1, "A"), // 5->4->3->2->1 @@ -138,7 +145,8 @@ namespace SimpleTesting public void StitchTestMultisetExtraSlowStart() { // Two different start times - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), @@ -159,7 +167,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(6, 1, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), StreamEvent.CreateStart(1, "A"), @@ -181,7 +190,8 @@ namespace SimpleTesting // This is the odd little case where we swapped "BEGIN" and "END" at both times 3 and 4 // so that they arrive in the opposite order. This shouldn't trouble the system at all: // Everything that happens at Time 3 is identical. Right? Right! - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "A"), @@ -192,7 +202,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "A") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(5, 1, "A"), END @@ -209,7 +220,8 @@ namespace SimpleTesting { // We have done horrible thigns to the dictionary: all elements are // identical! - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(2, 1, "A"), StreamEvent.CreateStart(2, "B"), @@ -220,7 +232,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, "B") }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, "A"), StreamEvent.CreateEnd(5, 1, "A"), END @@ -311,7 +324,8 @@ namespace SimpleTesting public static void StitchTestMultisetMultiStartCodegen() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(3, 2, StructTuple.Create("A", 3)), @@ -323,7 +337,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(7, 4, StructTuple.Create("A", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(6, 1, StructTuple.Create("A", 3)), // 6->5->1 @@ -353,7 +368,8 @@ namespace SimpleTesting var input = inputList.ToObservable().ToStreamable(); var outputStream = input.Stitch(); - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("B", 3)), StreamEvent.CreateEnd(3, 1, StructTuple.Create("A", 3)), @@ -369,7 +385,8 @@ namespace SimpleTesting public void StitchTestSimpleSpliceCodegen() { // nothing interesting happens here - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(2, 1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("A", 3)), @@ -380,7 +397,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, StructTuple.Create("A", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(5, 1, StructTuple.Create("A", 3)), END @@ -396,7 +414,8 @@ namespace SimpleTesting public void StitchTestMultisetOneStartCodegen() { // Two different start times - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(2, 1, StructTuple.Create("A", 3)), @@ -409,7 +428,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(6, 1, StructTuple.Create("A", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(5, 1, StructTuple.Create("A", 3)), // 5->4->3->2->1 @@ -430,7 +450,8 @@ namespace SimpleTesting public void StitchTestMultisetExtraSlowStartCodegen() { // Two different start times - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), @@ -451,7 +472,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(6, 1, StructTuple.Create("A", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), @@ -475,7 +497,8 @@ namespace SimpleTesting // This is the odd little case where we swapped "BEGIN" and "END" at both times 3 and 4 // so that they arrive in the opposite order. This shouldn't trouble the system at all: // Everything that happens at Time 3 is identical. Right? Right! - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(2, 1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("A", 3)), @@ -486,7 +509,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, StructTuple.Create("A", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(5, 1, StructTuple.Create("A", 3)), END @@ -505,7 +529,8 @@ namespace SimpleTesting { // We have done horrible thigns to the dictionary: all elements are // identical! - var inputList = new[] { + var inputList = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(2, 1, StructTuple.Create("A", 3)), StreamEvent.CreateStart(2, StructTuple.Create("B", 3)), @@ -516,7 +541,8 @@ namespace SimpleTesting StreamEvent.CreateEnd(5, 4, StructTuple.Create("B", 3)) }; - var compareTo = new[] { + var compareTo = new[] + { StreamEvent.CreateStart(1, StructTuple.Create("A", 3)), StreamEvent.CreateEnd(5, 1, StructTuple.Create("A", 3)), END