Пример #1
0
        public void NotNullMethodTwoParameters()
        {
            NullPropagatingTestClass foo = new NullPropagatingTestClass();
            var val = foo?.MethodTwoParameters(1, 2);

            AssertEquals(val, 3);
        }
Пример #2
0
        public void NotNullPropertyReturnInt()
        {
            NullPropagatingTestClass foo = new NullPropagatingTestClass();
            var val = foo?.Property;

            AssertEquals(val, 7);
        }
Пример #3
0
        public void NotNullFieldReturnInt()
        {
            NullPropagatingTestClass foo = new NullPropagatingTestClass();
            var val = foo?.Field;

            AssertEquals(val, 6);
        }
Пример #4
0
        public void NullMethodNoParameters()
        {
            NullPropagatingTestClass foo = null;
            var val = foo?.MethodNoParameters();

            AssertEquals(val, 0);
        }
Пример #5
0
        public void NullPropertyReturnInt()
        {
            NullPropagatingTestClass foo = null;
            var val = foo?.Property;

            AssertEquals(val, 0);
        }
Пример #6
0
 public void NotNullMethodTwoParameters()
 {
     NullPropagatingTestClass foo = new NullPropagatingTestClass();
     var val = foo?.MethodTwoParameters(1, 2);
     AssertEquals(val, 3);
 }
Пример #7
0
 public void NotNullPropertyReturnInt()
 {
     NullPropagatingTestClass foo = new NullPropagatingTestClass();
     var val = foo?.Property;
     AssertEquals(val, 7);
 }
Пример #8
0
 public void NotNullFieldReturnInt()
 {
     NullPropagatingTestClass foo = new NullPropagatingTestClass();
     var val = foo?.Field;
     AssertEquals(val, 6);
 }