public static void AssertPlanSingle(SupportFilterPlan expected) { if (_entries.Count != 1) { Assert.Fail("Zero or multiple entries"); } AssertPlan(expected, _entries[0].Plan); }
public static void AssertPlanSingleByType( string eventTypeName, SupportFilterPlan expected) { SupportFilterPlanEntry found = null; foreach (var entry in _entries) { if (entry.EventType.Name.Equals(eventTypeName)) { if (found != null) { Assert.Fail("found multiple for type " + eventTypeName); } found = entry; } } if (found == null) { Assert.Fail("No entry for type " + eventTypeName); } AssertPlan(expected, found.Plan); }
public static void AssertPlan( SupportFilterPlan expected, FilterSpecPlanForge received) { Assert.AreEqual(expected.Paths.Length, received.Paths.Length); AssertExpressionOpt(expected.ControlConfirm, received.FilterConfirm); AssertExpressionOpt(expected.ControlNegate, received.FilterNegate); var pathsReceived = new List<FilterSpecPlanPathForge>(Arrays.AsList(received.Paths)); for (var i = 0; i < expected.Paths.Length; i++) { var pathExpected = expected.Paths[i]; var path = FindPath(pathExpected, pathsReceived); if (path == null) { Assert.Fail("Failed to find path: " + pathExpected); } pathsReceived.Remove(path); AssertPlanPath(pathExpected, path); } }