コード例 #1
0
        public void CompareFactTypeOneFactTestCase()
        {
            DateTimeFact fact   = null;
            IFactType    first  = null;
            IFactType    second = null;

            Given("Create fact.", () => { fact = new DateTimeFact(DateTime.Now); })
            .When("Create fact info.", _ =>
            {
                first  = fact.GetFactType();
                second = fact.GetFactType();
            })
            .Then("Compare factInfos.", () =>
                  Assert.IsTrue(first.EqualsFactType(second), "Actual information is the same."))
            .Run();
        }
コード例 #2
0
        public void FailedCompareFactTypeTowFactTestCase()
        {
            DateTimeFact firstFact  = null;
            OtherFact    secondFact = null;
            IFactType    first      = null;
            IFactType    second     = null;

            Given("Create fact.", () =>
            {
                firstFact  = new DateTimeFact(DateTime.Now);
                secondFact = new OtherFact(firstFact.Value);
            })
            .When("Create fact info.", _ =>
            {
                first  = firstFact.GetFactType();
                second = secondFact.GetFactType();
            })
            .Then("Compare factInfos", () =>
                  Assert.IsFalse(first.EqualsFactType(second), "Actual information is the same."))
            .Run();
        }