<commit_before>package com.oneandone.network.snmpman.configuration.modifier;

import com.oneandone.network.snmpman.configuration.type.ModifierProperties;
import org.snmp4j.smi.Integer32;
import org.testng.annotations.Test;

import static org.testng.Assert.*;

public class Integer32ModifierTest {

    @Test
    public void testModify() throws Exception {
        final ModifierProperties modifierProperties = new ModifierProperties();
        modifierProperties.put("minimum", Integer.MIN_VALUE);
        modifierProperties.put("maximum", Integer.MAX_VALUE);
        modifierProperties.put("minimumStep", 1);
        modifierProperties.put("maximumStep", 10);

        final Integer32Modifier modifier = new Integer32Modifier();
        modifier.init(modifierProperties);

        final Integer32 integer32 = new Integer32(0);
        assertEquals(integer32.getValue(), 0);

        final Integer32 modifiedVariable = modifier.modify(integer32);
        assertNotEquals(modifiedVariable.getValue(), 0);
    }
    
}<commit_msg>added test<commit_after>package com.oneandone.network.snmpman.configuration.modifier;

import com.oneandone.network.snmpman.configuration.type.ModifierProperties;
import org.snmp4j.smi.Integer32;
import org.testng.annotations.Test;

import static org.testng.Assert.*;

public class Integer32ModifierTest {

    @Test
    public void testModify() throws Exception {
        final ModifierProperties modifierProperties = new ModifierProperties();
        modifierProperties.put("minimum", Integer.MIN_VALUE);
        modifierProperties.put("maximum", Integer.MAX_VALUE);
        modifierProperties.put("minimumStep", 1);
        modifierProperties.put("maximumStep", 10);

        final Integer32Modifier modifier = new Integer32Modifier();
        modifier.init(modifierProperties);

        final Integer32 integer32 = new Integer32(0);
        assertEquals(integer32.getValue(), 0);

        final Integer32 modifiedVariable = modifier.modify(integer32);
        assertNotEquals(modifiedVariable.getValue(), 0);
    }
    
    @Test
    public void testProperties() throws Exception {
        final ModifierProperties modifierProperties = new ModifierProperties();
        modifierProperties.put("minimum", Integer.MIN_VALUE);
        modifierProperties.put("maximum", Integer.MAX_VALUE);
        modifierProperties.put("minimumStep", 1);
        modifierProperties.put("maximumStep", 10);

        final Integer32Modifier modifier = new Integer32Modifier();
        modifier.init(modifierProperties);
        
        assertEquals(modifier.getMinimum(), new Integer(Integer.MIN_VALUE));
        assertEquals(modifier.getMaximum(), new Integer(Integer.MAX_VALUE));
        assertEquals(modifier.getMinimumStep(), new Integer(1));
        assertEquals(modifier.getMaximumStep(), new Integer(10));
    }
    
}
{'fraction_non_alphanumeric': 0.10116320056397603, 'fraction_numerical': 0.022559041240747268, 'mean_word_length': 3.9528795811518322, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7594802', 'n_tokens_mistral': 790, 'n_tokens_neox': 729, 'n_words': 142}