public void CompareTwoFactsWithDifferentVerbs() { IsFact fact1 = new IsFact("Temperature", 38); IsNotFact fact2 = new IsNotFact("Temperature", 38); Assert.AreNotEqual(fact1, fact2); }
public void CreateIsFact() { IsFact fact = new IsFact("Temperature", 38); Assert.AreEqual("Temperature", fact.Name); Assert.AreEqual(38, fact.Value); Assert.AreEqual("is", fact.Verb); }
public void CompareTwoEqualFactsWithNullValue() { IsFact fact1 = new IsFact("Temperature", null); IsFact fact2 = new IsFact("Temperature", null); Assert.AreEqual(fact1, fact2); Assert.AreEqual(fact1.GetHashCode(), fact2.GetHashCode()); }
public void TrueFact() { Fact fact = new IsFact("Temperature", 36); Assert.IsTrue(this.world.IsAFact(fact)); }
public void RetractAndTestFact() { Fact fact = new IsFact("Temperature", 36); this.world.RetractFact(fact); Assert.IsFalse(this.world.IsAFact(fact)); }
public void RaiseWhenRetractFalseFact() { Fact fact = new IsFact("Age", 40); this.world.RetractFact(fact); }
public void FalseFact() { Fact fact = new IsFact("Temperature", 42); Assert.IsFalse(this.world.IsAFact(fact)); }
public void AssertTwiceRetractAndTestFact() { Fact fact = new IsFact("Age", 40); this.world.AssertFact(fact); this.world.AssertFact(new IsFact("Age", 40)); this.world.RetractFact(fact); Assert.IsFalse(this.world.IsAFact(fact)); }
public void IsNotSatisfiedByNull() { IsFact fact = new IsFact("Temperature", 38); Assert.IsFalse(fact.IsSatisfiedByValue(null)); }
public void IsNotSatisfiedByContext() { IsFact fact = new IsFact("Temperature", 38); Context context = new Context(); Assert.IsFalse(fact.IsSatisfiedByContext(context)); }
public void CompareFactWithObject() { IsFact fact = new IsFact("Temperature", 38); Assert.AreNotEqual(fact, 38); }
public void CompareFactWithNull() { IsFact fact = new IsFact("Temperature", 38); Assert.IsFalse(fact.Equals(null)); }
public void IsSatisfiedByValue() { IsFact fact = new IsFact("Temperature", 38); Assert.IsTrue(fact.IsSatisfiedByValue(38)); }
public void IsSatisfiedByNullWhenNull() { IsFact fact = new IsFact("Temperature", null); Assert.IsTrue(fact.IsSatisfiedByValue(null)); }
public void IsSatisfiedByContext() { IsFact fact = new IsFact("Temperature", 38); Context context = new Context(); context.SetValue("Temperature", 38); Assert.IsTrue(fact.IsSatisfiedByContext(context)); }