<commit_before>/*
 * openwms.org, the Open Warehouse Management System.
 *
 * This file is part of openwms.org.
 *
 * openwms.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * openwms.org 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software. If not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.openwms.core.domain.system.usermanagement;

import static junit.framework.Assert.fail;

import org.junit.Test;
import org.openwms.core.test.AbstractJpaSpringContextTests;

/**
 * A EmailTest.
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: $
 */
public class EmailTest extends AbstractJpaSpringContextTests {

    @Test
    public final void testConstruction() {
        try {
            Email e1 = new Email(null, null);
            fail("Not allowed to create an email without user and address");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without user and address");
        }
        try {
            Email e1 = new Email("Test", null);
            fail("Not allowed to create an email without address");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without address");
        }
        try {
            Email e1 = new Email(null, "force something, still no mail check");
            fail("Not allowed to create an email without user");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without user");
        }

    }
}<commit_msg>Improved<commit_after>/*
 * openwms.org, the Open Warehouse Management System.
 *
 * This file is part of openwms.org.
 *
 * openwms.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * openwms.org 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software. If not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.openwms.core.domain.system.usermanagement;

import static junit.framework.Assert.fail;

import org.junit.Test;
import org.openwms.core.test.AbstractJpaSpringContextTests;

/**
 * An EmailTest.
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: $
 */
public class EmailTest extends AbstractJpaSpringContextTests {

    @Test
    public final void testConstruction() {
        try {
            new Email(null, null);
            fail("Not allowed to create an email without user and address");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without user and address");
        }
        try {
            new Email("Test", null);
            fail("Not allowed to create an email without address");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without address");
        }
        try {
            new Email(null, "force something, still no mail check");
            fail("Not allowed to create an email without user");
        } catch (AssertionError e) {
            logger.debug("Not allowed to create an email without user");
        }
    }
}
{'fraction_non_alphanumeric': 0.0869047619047619, 'fraction_numerical': 0.0064285714285714285, 'mean_word_length': 2.8365296803652966, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4561725', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1092, 'n_words': 480}