public void should_initialize_to_default_value() { DefaultValueDemoClass defaultValueDemo = new DefaultValueDemoClass(); // change the variable values of the following 2 lines to correct values ???? var expectedReferenceTypeValue = default(RefTypeClass); const int expectedValueTypeValue = 0; Assert.Equal(expectedReferenceTypeValue, defaultValueDemo.referenceTypeValue); Assert.Equal(expectedValueTypeValue, defaultValueDemo.valueTypeValue); }
public void should_initialize_to_default_value() { var defaultValueDemo = new DefaultValueDemoClass(); // change the variable values of the following 2 lines to correct values //var expectedReferenceTypeValue = new RefTypeClass(default(int)); //const int expectedValueTypeValue = 1; var expectedReferenceTypeValue = new RefTypeClass(0); expectedReferenceTypeValue = null; const int expectedValueTypeValue = 0; Assert.Equal(expectedReferenceTypeValue, defaultValueDemo.referenceTypeValue); Assert.Equal(expectedValueTypeValue, defaultValueDemo.valueTypeValue); }