public void rpt_AccountIntensity_ResourceName_Property_String_Type_Verify_Test() { // Arrange var rptAccountIntensity = new rpt_AccountIntensity(); rptAccountIntensity.ResourceName = Fixture.Create <string>(); var stringType = rptAccountIntensity.ResourceName.GetType(); // Act var isTypeString = typeof(string) == stringType; var isTypeInt = typeof(int) == stringType; var isTypeDecimal = typeof(decimal) == stringType; var isTypeLong = typeof(long) == stringType; var isTypeBool = typeof(bool) == stringType; var isTypeDouble = typeof(double) == stringType; var isTypeFloat = typeof(float) == stringType; // Assert isTypeString.ShouldBeTrue(); isTypeInt.ShouldBeFalse(); isTypeDecimal.ShouldBeFalse(); isTypeLong.ShouldBeFalse(); isTypeBool.ShouldBeFalse(); isTypeDouble.ShouldBeFalse(); isTypeFloat.ShouldBeFalse(); }
public void rpt_AccountIntensity_Class_Invalid_Property_Parameter_AccountManagerIDNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test() { // Arrange const string propertyNameParameterAccountManagerId = "Parameter_AccountManagerIDNotPresent"; var rptAccountIntensity = new rpt_AccountIntensity(); // Act , Assert Should.NotThrow(action: () => rptAccountIntensity.GetType().GetProperty(propertyNameParameterAccountManagerId)); }
public void rpt_AccountIntensity_Class_Invalid_Property_NewGeneratorNotPresent_Access_Using_Reflexion_Doesnt_Throw_Exception_Test() { // Arrange const string propertyNameNewGenerator = "NewGeneratorNotPresent"; var rptAccountIntensity = new rpt_AccountIntensity(); // Act , Assert Should.NotThrow(action: () => rptAccountIntensity.GetType().GetProperty(propertyNameNewGenerator)); }
public void rpt_AccountIntensity_Section5_Property_Setting_String_Throw_Argument_Exception_Test() { // Arrange const string propertyNameSection5 = "Section5"; var rptAccountIntensity = new rpt_AccountIntensity(); var randomString = Fixture.Create <string>(); var propertyInfo = rptAccountIntensity.GetType().GetProperty(propertyNameSection5); // Act , Assert propertyInfo.ShouldNotBeNull(); Should.Throw <ArgumentException>(actual: () => propertyInfo.SetValue(rptAccountIntensity, randomString, null)); }
public void rpt_AccountIntensity_Section5_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameSection5 = "Section5"; var rptAccountIntensity = new rpt_AccountIntensity(); var propertyInfo = rptAccountIntensity.GetType().GetProperty(propertyNameSection5); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }
public void rpt_AccountIntensity_Parameter_customerType_Property_Is_Present_In_Class_As_Public_Test() { // Arrange const string propertyNameParameterCustomerType = "Parameter_customerType"; var rptAccountIntensity = new rpt_AccountIntensity(); var propertyInfo = rptAccountIntensity.GetType().GetProperty(propertyNameParameterCustomerType); // Act var canRead = propertyInfo.CanRead; // Assert propertyInfo.ShouldNotBeNull(); canRead.ShouldBeTrue(); }
public void rpt_AccountIntensity_NewGenerator_Property_Bool_Type_Verify_Test() { // Arrange var rptAccountIntensity = new rpt_AccountIntensity(); rptAccountIntensity.NewGenerator = Fixture.Create <bool>(); var boolType = rptAccountIntensity.NewGenerator.GetType(); // Act var isTypeBool = typeof(bool) == boolType; var isTypeNullableBool = typeof(bool?) == boolType; var isTypeString = typeof(string) == boolType; var isTypeInt = typeof(int) == boolType; var isTypeDecimal = typeof(decimal) == boolType; var isTypeLong = typeof(long) == boolType; var isTypeDouble = typeof(double) == boolType; var isTypeFloat = typeof(float) == boolType; var isTypeIntNullable = typeof(int?) == boolType; var isTypeDecimalNullable = typeof(decimal?) == boolType; var isTypeLongNullable = typeof(long?) == boolType; var isTypeDoubleNullable = typeof(double?) == boolType; var isTypeFloatNullable = typeof(float?) == boolType; // Assert isTypeBool.ShouldBeTrue(); isTypeString.ShouldBeFalse(); isTypeNullableBool.ShouldBeFalse(); isTypeInt.ShouldBeFalse(); isTypeDecimal.ShouldBeFalse(); isTypeLong.ShouldBeFalse(); isTypeDouble.ShouldBeFalse(); isTypeFloat.ShouldBeFalse(); isTypeIntNullable.ShouldBeFalse(); isTypeDecimalNullable.ShouldBeFalse(); isTypeLongNullable.ShouldBeFalse(); isTypeDoubleNullable.ShouldBeFalse(); isTypeFloatNullable.ShouldBeFalse(); }
public void Constructor_rpt_AccountIntensity_5_Objects_Creation_No_Paramters_Test() { // Arrange var firstrptAccountIntensity = new rpt_AccountIntensity(); var secondrptAccountIntensity = new rpt_AccountIntensity(); var thirdrptAccountIntensity = new rpt_AccountIntensity(); var fourthrptAccountIntensity = new rpt_AccountIntensity(); var fifthrptAccountIntensity = new rpt_AccountIntensity(); var sixthrptAccountIntensity = new rpt_AccountIntensity(); // Act, Assert firstrptAccountIntensity.ShouldNotBeNull(); secondrptAccountIntensity.ShouldNotBeNull(); thirdrptAccountIntensity.ShouldNotBeNull(); fourthrptAccountIntensity.ShouldNotBeNull(); fifthrptAccountIntensity.ShouldNotBeNull(); sixthrptAccountIntensity.ShouldNotBeNull(); firstrptAccountIntensity.ShouldNotBeSameAs(secondrptAccountIntensity); thirdrptAccountIntensity.ShouldNotBeSameAs(firstrptAccountIntensity); fourthrptAccountIntensity.ShouldNotBeSameAs(firstrptAccountIntensity); fifthrptAccountIntensity.ShouldNotBeSameAs(firstrptAccountIntensity); sixthrptAccountIntensity.ShouldNotBeSameAs(firstrptAccountIntensity); sixthrptAccountIntensity.ShouldNotBeSameAs(fourthrptAccountIntensity); }