<commit_before>/*
 * Copyright 2008 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.kfs.module.bc.document.validation.impl;

import java.math.BigDecimal;

import org.kuali.core.util.KualiDecimal;
import org.kuali.core.util.KualiInteger;
import org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding;
import org.kuali.kfs.sys.ConfigureContext;
import org.kuali.kfs.sys.context.KualiTestBase;
/**
 * 
 * Tests salary setting rules.
 */
@ConfigureContext
public class SalarySettingRuleUtilTest extends KualiTestBase {
    
    /**
     * tests AppointmentRequestedAmountIsNonNegative with negative value
     * expected result is false
     */
    public void testAppointmentRequestedAmountIsNonNegative_negativeValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(-10));
        
        assertFalse(SalarySettingRuleUtil.isValidRequestedAmount(appointmentFunding));
    }
    
    /**
     * tests AppointmentRequestedAmountIsNonNegative with non-negative value
     * expected result is true
     */
    public void testAppointmentRequestedAmountIsNonNegative_nonNegativeValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(10));
        
        assertTrue(SalarySettingRuleUtil.isValidRequestedAmount(appointmentFunding));
    }

    /**
     * tests AppointmentRequestedFteQuantityIsGreaterThanZero with zero amount value
     * expected result is false
     */
    public void testAppointmentRequestedFteQuantityIsGreaterThanZero_ZeroAmountValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(0));
        appointmentFunding.setAppointmentRequestedFteQuantity(new BigDecimal(10.0));
        
        assertFalse(SalarySettingRuleUtil.isValidRequestedFteQuantity(appointmentFunding));
    }

    /**
     * tests AppointmentRequestedFteQuantityIsGreaterThanZero with greater than zero amount and fte
     * expected result is true
     */
    public void testAppointmentRequestedFteQuantityIsGreaterThanZero_GreaterThanZeroAmountAndFteValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(1));
        appointmentFunding.setAppointmentRequestedFteQuantity(new BigDecimal(10.0));
        
        assertTrue(SalarySettingRuleUtil.isValidRequestedFteQuantity(appointmentFunding));
    }

    /**
     * tests AppointmentRequestedFteQuantityIsGreaterThanZero with greater than zero amount and zero fte value
     * expected result is false
     */
    public void testAppointmentRequestedFteQuantityIsGreaterThanZero_GreaterThanZeroAmountZeroFteValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(1));
        appointmentFunding.setAppointmentRequestedFteQuantity(new BigDecimal(0));
        
        assertFalse(SalarySettingRuleUtil.isValidRequestedFteQuantity(appointmentFunding));
    }

    /**
     * tests AppointmentRequestedFteQuantityIsGreaterThanZero with greater than zero amount and less than zero fte value
     * expected result is false
     */
    public void testAppointmentRequestedFteQuantityIsGreaterThanZero_GreaterThanZeroAmountLessThanZeroFteValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(1));
        appointmentFunding.setAppointmentRequestedFteQuantity(new BigDecimal(-10));
        
        assertFalse(SalarySettingRuleUtil.isValidRequestedFteQuantity(appointmentFunding));
    }
}
<commit_msg>remove test cases, which might be rewritten.<commit_after>/*
 * Copyright 2008 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.kfs.module.bc.document.validation.impl;

import java.math.BigDecimal;

import org.kuali.core.util.KualiDecimal;
import org.kuali.core.util.KualiInteger;
import org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding;
import org.kuali.kfs.sys.ConfigureContext;
import org.kuali.kfs.sys.context.KualiTestBase;
/**
 * 
 * Tests salary setting rules.
 */
@ConfigureContext
public class SalarySettingRuleUtilTest extends KualiTestBase {
    
    /**
     * tests AppointmentRequestedAmountIsNonNegative with negative value
     * expected result is false
     */
    public void testAppointmentRequestedAmountIsNonNegative_negativeValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(-10));
        
        assertFalse(SalarySettingRuleUtil.isValidRequestedAmount(appointmentFunding));
    }
    
    /**
     * tests AppointmentRequestedAmountIsNonNegative with non-negative value
     * expected result is true
     */
    public void testAppointmentRequestedAmountIsNonNegative_nonNegativeValue() {
        PendingBudgetConstructionAppointmentFunding appointmentFunding = new PendingBudgetConstructionAppointmentFunding();
        appointmentFunding.setAppointmentRequestedAmount(new KualiInteger(10));
        
        assertTrue(SalarySettingRuleUtil.isValidRequestedAmount(appointmentFunding));
    }
}

{'fraction_non_alphanumeric': 0.06297737426142096, 'fraction_numerical': 0.0050439544602968725, 'mean_word_length': 4.669934640522876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6277328', 'n_tokens_mistral': 1973, 'n_tokens_neox': 1809, 'n_words': 403}