public void PropertiesWithRequiredAttribute_ShouldReturnTrue(string propertyName)
        {
            var bill = new RemunerationBill();

            var result = bill.GetType()
                         .GetProperty(propertyName)
                         .GetCustomAttributes(false)
                         .Where(x => x.GetType() == typeof(RequiredAttribute))
                         .Any();

            Assert.IsTrue(result);
        }
        public void SocialSecurityIncomeProperty_WithRangeAttribute_MustReturnMaxSocialSecurityIncomeValue(string propertyName)
        {
            var bill = new RemunerationBill();

            var result = bill.GetType()
                         .GetProperty(SocialSecurityIncomeProperty)
                         .GetCustomAttributes(false)
                         .Where(x => x.GetType() == typeof(System.ComponentModel.DataAnnotations.RangeAttribute))
                         .Select(x => (System.ComponentModel.DataAnnotations.RangeAttribute)x)
                         .FirstOrDefault();

            Assert.AreEqual(ValidationConstants.MaxSocialSecurityIncome, result.Maximum);
        }
        public void PropertyWithForeignKeyAttribute_ShouldReturnTrue()
        {
            // Arrange
            var bill = new RemunerationBill();

            // Act
            var result = bill.GetType()
                         .GetProperty("Employee")
                         .GetCustomAttributes(false)
                         .Where(x => x.GetType() == typeof(ForeignKeyAttribute))
                         .Any();

            // Assert
            Assert.IsTrue(result);
        }