Example #1
0
        public static FilterSpecParamForge AssertPlanSingleForTypeAndReset(string typeName)
        {
            SupportFilterPlanEntry found = null;
            foreach (var entry in _entries) {
                if (!entry.EventType.Name.Equals(typeName)) {
                    continue;
                }

                if (found != null) {
                    Assert.Fail("Found multiple");
                }

                found = entry;
            }

            Assert.IsNotNull(found);
            Reset();
            return found.GetAssertSingle(typeName);
        }
Example #2
0
        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);
        }