コード例 #1
0
        public void should_restrict_to_ref_type_on_type_argument()
        {
            var demoObject = new RefTypeRestrictedGenericDemoClass <string>();

            // correct the variable value to fix the test
            const string expectedInitialValue = "Hello";

            Assert.Equal(expectedInitialValue, demoObject.Value);
        }
コード例 #2
0
        public void should_restrict_to_ref_type_on_type_argument()
        {
            var demoObject = new RefTypeRestrictedGenericDemoClass <string>();

            // correct the variable value to fix the test
            // default type of reference type is null
            const string expectedInitialValue = null;

            Assert.Equal(expectedInitialValue, demoObject.Value);
        }
コード例 #3
0
        public void should_restrict_to_ref_type_on_type_argument()
        {
            var demoObject = new RefTypeRestrictedGenericDemoClass<string>();

            // correct the variable value to fix the test
            const string expectedInitialValue = "Hello";

            Assert.Equal(expectedInitialValue, demoObject.Value);
        }