Example #1
0
        public void rpt_KMLogoClick_Class_Invalid_Property_Parameter_todtNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test()
        {
            // Arrange
            const string propertyNameParameterTodt = "Parameter_todtNotPresent";
            var          rptKmLogoClick            = new rpt_KMLogoClick();

            // Act , Assert
            Should.NotThrow(action: () => rptKmLogoClick.GetType().GetProperty(propertyNameParameterTodt));
        }
Example #2
0
        public void rpt_KMLogoClick_Section5_Property_Setting_String_Throw_Argument_Exception_Test()
        {
            // Arrange
            const string propertyNameSection5 = "Section5";
            var          rptKmLogoClick       = new rpt_KMLogoClick();
            var          randomString         = Fixture.Create <string>();
            var          propertyInfo         = rptKmLogoClick.GetType().GetProperty(propertyNameSection5);

            // Act , Assert
            propertyInfo.ShouldNotBeNull();
            Should.Throw <ArgumentException>(actual: () => propertyInfo.SetValue(rptKmLogoClick, randomString, null));
        }
Example #3
0
        public void rpt_KMLogoClick_Section5_Property_Is_Present_In_Class_As_Public_Test()
        {
            // Arrange
            const string propertyNameSection5 = "Section5";
            var          rptKmLogoClick       = new rpt_KMLogoClick();
            var          propertyInfo         = rptKmLogoClick.GetType().GetProperty(propertyNameSection5);

            // Act
            var canRead = propertyInfo.CanRead;

            // Assert
            propertyInfo.ShouldNotBeNull();
            canRead.ShouldBeTrue();
        }
Example #4
0
        public void rpt_KMLogoClick_Parameter_fromdt_Property_Is_Present_In_Class_As_Public_Test()
        {
            // Arrange
            const string propertyNameParameterFromdt = "Parameter_fromdt";
            var          rptKmLogoClick = new rpt_KMLogoClick();
            var          propertyInfo   = rptKmLogoClick.GetType().GetProperty(propertyNameParameterFromdt);

            // Act
            var canRead = propertyInfo.CanRead;

            // Assert
            propertyInfo.ShouldNotBeNull();
            canRead.ShouldBeTrue();
        }