public void rpt_SurveyTextResponse_Class_Invalid_Property_Parameter_OtherTextNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test() { // Arrange const string propertyNameParameterOtherText = "Parameter_OtherTextNotPresent"; var rptSurveyTextResponse = new rpt_SurveyTextResponse(); // Act , Assert Should.NotThrow(action: () => rptSurveyTextResponse.GetType().GetProperty(propertyNameParameterOtherText)); }
public void rpt_SurveyTextResponse_Section6_Property_Setting_String_Throw_Argument_Exception_Test() { // Arrange const string propertyNameSection6 = "Section6"; var rptSurveyTextResponse = new rpt_SurveyTextResponse(); var randomString = Fixture.Create <string>(); var propertyInfo = rptSurveyTextResponse.GetType().GetProperty(propertyNameSection6); // Act , Assert propertyInfo.ShouldNotBeNull(); Should.Throw <ArgumentException>(actual: () => propertyInfo.SetValue(rptSurveyTextResponse, randomString, null)); }
public void rpt_SurveyTextResponse_Section6_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameSection6 = "Section6"; var rptSurveyTextResponse = new rpt_SurveyTextResponse(); var propertyInfo = rptSurveyTextResponse.GetType().GetProperty(propertyNameSection6); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }
public void rpt_SurveyTextResponse_Parameter_OtherText_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameParameterOtherText = "Parameter_OtherText"; var rptSurveyTextResponse = new rpt_SurveyTextResponse(); var propertyInfo = rptSurveyTextResponse.GetType().GetProperty(propertyNameParameterOtherText); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }