<commit_before>/*
 *    Copyright (c) 2010-2011 <NAME> (mrmx.org)
 *
 *    This program is free software: you can redistribute it and/or  modify
 *    it under the terms of the GNU Affero General Public License, version 3,
 *    as published by the Free Software Foundation.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.mongoste.core;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.mongoste.model.StatAction;
import org.mongoste.model.StatBasicCounter;
import org.mongoste.model.StatEvent;

/**
 *
 * @author mrmx
 */
public class AbstractStatsEngineTest {
    AbstractStatsEngine instance;

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
        instance = new AbstractStatsEngineImpl();
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of createDotPath method, of class AbstractStatsEngine.
     */
    @Test
    public void testCreateDotPath() {
        System.out.println("createDotPath");
        assertEquals("a", instance.createDotPath("a"));
        assertEquals("a.b", instance.createDotPath("a","b"));
        assertEquals("a.b.c", instance.createDotPath("a","b","c"));
        assertEquals("a.c", instance.createDotPath("a",null,"c"));
        assertEquals("a.c", instance.createDotPath("a","","c"));
        assertEquals("1.2", instance.createDotPath(1,2));
        assertEquals("a.c", instance.createDotPath("a.","c"));
        assertEquals("a.c", instance.createDotPath("a..","c."));<commit_msg>Some refactoring<commit_after>/*
 *    Copyright (c) 2010-2011 <NAME> (mrmx.org)
 *
 *    This program is free software: you can redistribute it and/or  modify
 *    it under the terms of the GNU Affero General Public License, version 3,
 *    as published by the Free Software Foundation.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.mongoste.core;

import org.mongoste.model.StatAction;
import org.mongoste.model.StatBasicCounter;
import org.mongoste.model.StatEvent;

import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 *
 * @author mrmx
 */
public class AbstractStatsEngineTest {
    AbstractStatsEngine instance;

    @Before
    public void setUp() {
        instance = new AbstractStatsEngineImpl();
    }

    /**
     * Test of createDotPath method, of class AbstractStatsEngine.
     */
    @Test
    public void testCreateDotPath() {
        System.out.println("createDotPath");
        assertEquals("a", instance.createDotPath("a"));
        assertEquals("a.b", instance.createDotPath("a","b"));
        assertEquals("a.b.c", instance.createDotPath("a","b","c"));
        assertEquals("a.c", instance.createDotPath("a",null,"c"));
        assertEquals("a.c", instance.createDotPath("a","","c"));
        assertEquals("1.2", instance.createDotPath(1,2));
        assertEquals("a.c", instance.createDotPath("a.","c"));
        assertEquals("a.c", instance.createDotPath("a..","c."));
{'fraction_non_alphanumeric': 0.12625397602153168, 'fraction_numerical': 0.006361634450697333, 'mean_word_length': 3.4099244875943904, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7658501', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1150, 'n_words': 344}