public void ItOnlyReturnsTriggeredBundles() { var collection = new TriggerCollection(); var bundles = new[] { new TriggerBundle(TriggerTestHelpers.StaticTrigger(true)), new TriggerBundle(TriggerTestHelpers.StaticTrigger(false)), new TriggerBundle(TriggerTestHelpers.StaticTrigger(true)), new TriggerBundle(TriggerTestHelpers.StaticTrigger(false)), new TriggerBundle(TriggerTestHelpers.StaticTrigger(false)) }; var expected = new[] { bundles[0], bundles[2], }; foreach (var bundle in bundles) { collection.Add(bundle); } var actual = collection.Check(); CollectionAssert.AreEqual(expected, actual); }
public void SetUp() { _trigger = TriggerTestHelpers.StaticTrigger(false); _actions = new[] { TriggerTestHelpers.DoNothingAction(), TriggerTestHelpers.DoNothingAction(), TriggerTestHelpers.DoNothingAction() }; _bundle = new TriggerBundle(_trigger, _actions); }