Beispiel #1
0
        public static void test_simple_constructor()
        {
            int    iface_prop = 42;
            string a          = "LFE";
            double b          = 3.14;

#if EFL_BETA
            int beta = 1337;
#endif

#if EFL_BETA
            var obj = new Dummy.Child(null, a, b, beta, iface_prop, 0);
#else
            var obj = new Dummy.Child(null, a, b, iface_prop);
#endif
            Test.AssertEquals(iface_prop, obj.IfaceProp);
            obj.Dispose();
#if EFL_BETA
            obj = new Dummy.Child(parent: null, ifaceProp: iface_prop, doubleParamsA: a, doubleParamsB: b,
                                  obligatoryBetaCtor: beta,
                                  optionalBetaCtor: -beta);
#else
            obj = new Dummy.Child(parent: null, ifaceProp: iface_prop, doubleParamsA: a, doubleParamsB: b);
#endif
            Test.AssertEquals(iface_prop, obj.IfaceProp);

#if EFL_BETA
            Test.Assert(obj.ObligatoryBetaCtorWasCalled);
            Test.Assert(obj.OptionalBetaCtorWasCalled);
#endif
            obj.Dispose();
        }
Beispiel #2
0
        public static void test_optional_constructor()
        {
            string a   = "LFE";
            double b   = 3.14;
            var    obj = new Dummy.Child(null, a, b);

            Test.Assert(!obj.GetIfaceWasSet());
        }
Beispiel #3
0
        public static void test_simple_constructor()
        {
            int    iface_prop = 42;
            string a          = "LFE";
            double b          = 3.14;
            var    obj        = new Dummy.Child(null, a, b, iface_prop);

            Test.AssertEquals(iface_prop, obj.IfaceProp);

            obj = new Dummy.Child(parent: null, ifaceProp: iface_prop, doubleParamsA: a, doubleParamsB: b);
            Test.AssertEquals(iface_prop, obj.IfaceProp);
        }
Beispiel #4
0
        public static void test_optional_constructor()
        {
            string a = "LFE";
            double b = 3.14;

#if EFL_BETA
            int beta = 2241;
            var obj  = new Dummy.Child(null, a, b, obligatoryBetaCtor: beta);
            Test.Assert(!obj.OptionalBetaCtorWasCalled);
#else
            var obj = new Dummy.Child(null, a, b);
#endif
            Test.Assert(!obj.GetIfaceWasSet());
        }