public void Should_be_able_to_try_remove_constraints() { var context = new ContextBag(); DelayDeliveryWith with; var resultBeforeAdd = context.TryRemoveDeliveryConstraint(out with); context.AddDeliveryConstraint(new DelayDeliveryWith(TimeSpan.FromHours(1))); var resultAfterAdd = context.TryRemoveDeliveryConstraint(out with); Assert.IsFalse(resultBeforeAdd); Assert.IsTrue(resultAfterAdd); }