IsOpen() public method

public IsOpen ( object thing, object value, string featureName ) : bool
thing object
value object
featureName string
return bool
コード例 #1
0
        public void IsOpenReturnsTrueWhenActorIsInSet()
        {
            var actor = MockRepository.GenerateStub<IFlipperActor>();
            actor.Stub(x => x.FlipperId).Return("5");
            var gate = new ActorGate();

            Assert.That(gate.IsOpen(actor, new HashSet<string>(new[] {"5"}), "feature"), Is.True);
        }
コード例 #2
0
        public void IsOpenReturnsFalseWhenActorNotAnIFlipperActor()
        {
            var gate = new ActorGate();

            Assert.That(gate.IsOpen(new object(), new HashSet<string>(new[] {"5"}), "feature"), Is.False);
        }
コード例 #3
0
        public void IsOpenReturnsFalseForNullActor()
        {
            var gate = new ActorGate();

            Assert.That(gate.IsOpen(null, new HashSet<string>(new[] {"5"}), "feature"), Is.False);
        }