<commit_before>package lab.dynafig;

import java.util.Collections;

/**
 * {@code DefaultDynafigTest} tests {@link DefaultDynafig}.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class DefaultDynafigTest<T, R>
        extends DynafigTesting<T, R, DefaultDynafig> {
    public DefaultDynafigTest(final Args<T, R> args) {
        super(args);
    }

    @Override
    protected void presetValue(final String value) {
        dynafig(new DefaultDynafig(Collections.singletonMap(KEY, value)));
    }
}<commit_msg>Ctor tests for default dynafig.<commit_after>package lab.dynafig;

import org.junit.Test;

import java.util.Properties;

import static java.util.Collections.singletonMap;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

/**
 * {@code DefaultDynafigTest} tests {@link DefaultDynafig}.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class DefaultDynafigTest<T, R>
        extends DynafigTesting<T, R, DefaultDynafig> {
    public DefaultDynafigTest(final Args<T, R> args) {
        super(args);
    }

    @Override
    protected void presetValue(final String value) {
        dynafig(new DefaultDynafig(singletonMap(KEY, value)));
    }

    public static final class CtorTest {
        @Test
        public void shouldConstructFromMap() {
            assertThat(new DefaultDynafig(singletonMap(KEY, "")).
                    track(KEY).isPresent(), is(true));
        }

        @Test
        public void shouldConstructFromEntryStream() {
            assertThat(new DefaultDynafig(singletonMap(KEY, "").
                    entrySet().stream()).
                    track(KEY).isPresent(), is(true));
        }

        @Test
        public void shouldConstructFromProperties() {
            final Properties properties = new Properties();
            properties.put(KEY, "");
            assertThat(new DefaultDynafig(properties).
                    track(KEY).isPresent(), is(true));
        }
    }
}
{'fraction_non_alphanumeric': 0.12190187152250885, 'fraction_numerical': 0.0, 'mean_word_length': 2.8259187620889747, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3403993', 'n_tokens_mistral': 585, 'n_tokens_neox': 582, 'n_words': 121}