상속: NameVerbValueFact
예제 #1
0
        public void CompareTwoFactsWithDifferentVerbs()
        {
            IsFact fact1 = new IsFact("Temperature", 38);
            IsNotFact fact2 = new IsNotFact("Temperature", 38);

            Assert.AreNotEqual(fact1, fact2);
        }
예제 #2
0
        public void CreateIsNotFact()
        {
            IsNotFact fact = new IsNotFact("Temperature", 38);

            Assert.AreEqual("Temperature", fact.Name);
            Assert.AreEqual(38, fact.Value);
            Assert.AreEqual("is_not", fact.Verb);
        }
예제 #3
0
        public void CompareTwoEqualFactsWithNullValue()
        {
            IsNotFact fact1 = new IsNotFact("Temperature", null);
            IsNotFact fact2 = new IsNotFact("Temperature", null);

            Assert.AreEqual(fact1, fact2);
            Assert.AreEqual(fact1.GetHashCode(), fact2.GetHashCode());
        }
예제 #4
0
 public void IsSatisfiedByWorldContext()
 {
     Fact fact = new IsNotFact("Temperature", 20);
     Assert.IsTrue(this.world.IsAFact(fact));
 }
예제 #5
0
 public void IsNotSatisfiedByNullWhenNull()
 {
     IsNotFact fact = new IsNotFact("Temperature", null);
     Assert.IsFalse(fact.IsSatisfiedByValue((object)null));
 }
예제 #6
0
 public void IsNotSatisfiedByContext()
 {
     IsNotFact fact = new IsNotFact("Temperature", 38);
     Context context = new Context();
     context.SetValue("Temperature", 38);
     Assert.IsFalse(fact.IsSatisfiedByContext(context));
 }
예제 #7
0
        public void CompareFactWithObject()
        {
            IsNotFact fact = new IsNotFact("Temperature", 38);

            Assert.AreNotEqual(fact, 38);
        }
예제 #8
0
        public void CompareFactWithNull()
        {
            IsNotFact fact = new IsNotFact("Temperature", 38);

            Assert.IsFalse(fact.Equals(null));
        }
예제 #9
0
 public void IsSatisfiedByValue()
 {
     IsNotFact fact = new IsNotFact("Temperature", 38);
     Assert.IsTrue(fact.IsSatisfiedByValue(30));
 }
예제 #10
0
 public void IsSatisfiedByNull()
 {
     IsNotFact fact = new IsNotFact("Temperature", 38);
     Assert.IsTrue(fact.IsSatisfiedByValue((object) null));
 }