public void rpt_SurveyReport_Class_Invalid_Property_DetailSection3NotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test() { // Arrange const string propertyNameDetailSection3 = "DetailSection3NotPresent"; var rptSurveyReport = new rpt_SurveyReport(); // Act , Assert Should.NotThrow(action: () => rptSurveyReport.GetType().GetProperty(propertyNameDetailSection3)); }
public void rpt_SurveyReport_Class_Invalid_Property_Parameter_totalRespondentNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test() { // Arrange const string propertyNameParameterTotalRespondent = "Parameter_totalRespondentNotPresent"; var rptSurveyReport = new rpt_SurveyReport(); // Act , Assert Should.NotThrow(action: () => rptSurveyReport.GetType().GetProperty(propertyNameParameterTotalRespondent)); }
public void rpt_SurveyReport_Section2_Property_Setting_String_Throw_Argument_Exception_Test() { // Arrange const string propertyNameSection2 = "Section2"; var rptSurveyReport = new rpt_SurveyReport(); var randomString = Fixture.Create <string>(); var propertyInfo = rptSurveyReport.GetType().GetProperty(propertyNameSection2); // Act , Assert propertyInfo.ShouldNotBeNull(); Should.Throw <ArgumentException>(actual: () => propertyInfo.SetValue(rptSurveyReport, randomString, null)); }
public void rpt_SurveyReport_Section3_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameSection3 = "Section3"; var rptSurveyReport = new rpt_SurveyReport(); var propertyInfo = rptSurveyReport.GetType().GetProperty(propertyNameSection3); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }
public void rpt_SurveyReport_Parameter_totalRespondent_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameParameterTotalRespondent = "Parameter_totalRespondent"; var rptSurveyReport = new rpt_SurveyReport(); var propertyInfo = rptSurveyReport.GetType().GetProperty(propertyNameParameterTotalRespondent); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }