Exemple #1
0
        public void ImpliesTest()
        {
            Assert.IsTrue((bool)OclBoolean.implies(FalseFunc, FalseFunc));
            Assert.IsFalse((bool)OclBoolean.implies(TrueFunc, FalseFunc));
            Assert.IsTrue((bool)OclBoolean.implies(FalseFunc, TrueFunc));
            Assert.IsTrue((bool)OclBoolean.implies(TrueFunc, TrueFunc));
            Assert.IsTrue((bool)OclBoolean.implies(FalseFunc, InvalidFunc));
            Assert.IsTrue((bool)OclBoolean.implies(InvalidFunc, TrueFunc));
            Assert.Throws(typeof(Exception), () => OclBoolean.implies(TrueFunc, InvalidFunc));
            Assert.Throws(typeof(Exception), () => OclBoolean.implies(InvalidFunc, FalseFunc));
            Assert.Throws(typeof(AggregateException), () => OclBoolean.implies(InvalidFunc, InvalidFunc));

            Assert.Throws(typeof(ArgumentNullException), () => OclBoolean.implies(TrueFunc, NullFunc));
            Assert.Throws(typeof(NullReferenceException), () => OclBoolean.implies(NullFunc, FalseFunc));
            Assert.Throws(typeof(AggregateException), () => OclBoolean.implies(NullFunc, NullFunc));
        }
Exemple #2
0
 public void AllInstancesTest()
 {
     TestUtils.AreEqual(new OclSet(OclBoolean.Type, (OclBoolean)false, (OclBoolean)true), OclBoolean.allInstances());
 }