コード例 #1
0
        public void ProductTest()
        {
            OclOrderedSet a         = TestUtils.CreateIntOrderedSet(1, 2);
            OclOrderedSet b         = TestUtils.CreateIntOrderedSet(1, 3);
            OclTupleType  tupleType = OclTupleType.Tuple(OclTupleType.Part("first", OclInteger.Type), OclTupleType.Part("second", OclInteger.Type));
            OclSet        pr        = new OclSet(tupleType,
                                                 new OclTuple(tupleType, (OclInteger)1, (OclInteger)1),
                                                 new OclTuple(tupleType, (OclInteger)1, (OclInteger)3),
                                                 new OclTuple(tupleType, (OclInteger)2, (OclInteger)1),
                                                 new OclTuple(tupleType, (OclInteger)2, (OclInteger)3)
                                                 );

            TestUtils.AreEqual(pr, a.product(b));
        }