Exemplo n.º 1
0
        public void RefParameter()
        {
            int x = 5;

            ClassWithStaticMethods.RefParameter(ref x);
            QUnit.AreEqual(x, 6);
        }
Exemplo n.º 2
0
        public void RefParameter()
        {
            int x = 5;

            ClassWithStaticMethods.RefParameter(ref x);
            AssertEquals(x, 6);
        }
Exemplo n.º 3
0
        public void OutParameter()
        {
            string x;

            ClassWithStaticMethods.OutParameter(out x);
            AssertEquals(x, "foo");
        }
Exemplo n.º 4
0
        public void OutParameter()
        {
            string x;

            ClassWithStaticMethods.OutParameter(out x);
            QUnit.AreEqual(x, "foo");
        }
Exemplo n.º 5
0
        public void RefAndOutParameter()
        {
            int x = 5;
            int y;

            ClassWithStaticMethods.RefAndOutParameter(ref x, out y);
            AssertEquals(x, 6);
            AssertEquals(y, 10);
        }
Exemplo n.º 6
0
        public void TwoRefParameters()
        {
            int x = 5;
            int y = 6;

            ClassWithStaticMethods.TwoRefParameters(ref x, ref y);
            AssertEquals(x, 6);
            AssertEquals(y, 12);
        }
Exemplo n.º 7
0
        public void TwoOutParameters()
        {
            string x;
            string y;

            ClassWithStaticMethods.TwoOutParameters(out x, out y);
            AssertEquals(x, "foo1");
            AssertEquals(y, "foo2");
        }
Exemplo n.º 8
0
        public void RefAndOutParameter()
        {
            int x = 5;
            int y;

            ClassWithStaticMethods.RefAndOutParameter(ref x, out y);
            QUnit.AreEqual(x, 6);
            QUnit.AreEqual(y, 10);
        }
Exemplo n.º 9
0
        public void TwoRefParameters()
        {
            int x = 5;
            int y = 6;

            ClassWithStaticMethods.TwoRefParameters(ref x, ref y);
            QUnit.AreEqual(x, 6);
            QUnit.AreEqual(y, 12);
        }
Exemplo n.º 10
0
        public void TwoOutParameters()
        {
            string x;
            string y;

            ClassWithStaticMethods.TwoOutParameters(out x, out y);
            QUnit.AreEqual(x, "foo1");
            QUnit.AreEqual(y, "foo2");
        }
Exemplo n.º 11
0
        public void NamedArguments()
        {
            var result = ClassWithStaticMethods.Add(one: 1, two: 2, three: 3, four: 4);

            AssertEquals(result, 4321);

            result = ClassWithStaticMethods.Add(two: 1, three: 2, four: 3);
            AssertEquals(result, 3210);

            result = ClassWithStaticMethods.Add(four: 1, three: 2, two: 3, one: 4);
            AssertEquals(result, 1234);
        }
Exemplo n.º 12
0
        public void StaticMethod()
        {
            var s = ClassWithStaticMethods.S();

            AssertEquals(s, "foo");
        }
Exemplo n.º 13
0
        public void StaticMethod()
        {
            var s = ClassWithStaticMethods.S();

            QUnit.AreEqual(s, "foo");
        }