Ejemplo n.º 1
0
        public void rpt_NoUsage_Class_Invalid_Property_Parameter_CustomerIDNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test()
        {
            // Arrange
            const string propertyNameParameterCustomerId = "Parameter_CustomerIDNotPresent";
            var          rptNoUsage = new rpt_NoUsage();

            // Act , Assert
            Should.NotThrow(action: () => rptNoUsage.GetType().GetProperty(propertyNameParameterCustomerId));
        }
Ejemplo n.º 2
0
        public void rpt_NoUsage_Class_Invalid_Property_NewGeneratorNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test()
        {
            // Arrange
            const string propertyNameNewGenerator = "NewGeneratorNotPresent";
            var          rptNoUsage = new rpt_NoUsage();

            // Act , Assert
            Should.NotThrow(action: () => rptNoUsage.GetType().GetProperty(propertyNameNewGenerator));
        }
Ejemplo n.º 3
0
        public void rpt_NoUsage_Section7_Property_Setting_String_Throw_Argument_Exception_Test()
        {
            // Arrange
            const string propertyNameSection7 = "Section7";
            var          rptNoUsage           = new rpt_NoUsage();
            var          randomString         = Fixture.Create <string>();
            var          propertyInfo         = rptNoUsage.GetType().GetProperty(propertyNameSection7);

            // Act , Assert
            propertyInfo.ShouldNotBeNull();
            Should.Throw <ArgumentException>(actual: () => propertyInfo.SetValue(rptNoUsage, randomString, null));
        }
Ejemplo n.º 4
0
        public void rpt_NoUsage_Section7_Property_Is_Present_In_Class_As_Public_Test()
        {
            // Arrange
            const string propertyNameSection7 = "Section7";
            var          rptNoUsage           = new rpt_NoUsage();
            var          propertyInfo         = rptNoUsage.GetType().GetProperty(propertyNameSection7);

            // Act
            var canRead = propertyInfo.CanRead;

            // Assert
            propertyInfo.ShouldNotBeNull();
            canRead.ShouldBeTrue();
        }
Ejemplo n.º 5
0
        public void rpt_NoUsage_Parameter_todt_Property_Is_Present_In_Class_As_Public_Test()
        {
            // Arrange
            const string propertyNameParameterTodt = "Parameter_todt";
            var          rptNoUsage   = new rpt_NoUsage();
            var          propertyInfo = rptNoUsage.GetType().GetProperty(propertyNameParameterTodt);

            // Act
            var canRead = propertyInfo.CanRead;

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