@@ -0,0 +1,2014 @@
+package fr.univ_tln.trailscommunity.root;%0A%0Aimport junit.framework.Assert;%0A%0Aimport org.junit.Test;%0A%0Aimport fr.univ_tln.trailscommunity.utilities.validators.EmailValidator;%0A%0Aimport static junit.framework.TestCase.assertTrue;%0A%0A/**%0A * Project TrailsCommunity.%0A * Package fr.univ_tln.trailscommunity.root.%0A * File EmailValidationTest.java.%0A * Created by Ysee on 20/11/2016 - 01:00.%0A * www.yseemonnier.com%0A * https://github.com/YMonnier%0A * %3Cp%3E%0A * Email validator tests%0A * Test all validation possibilities email.%0A */%0Apublic class EmailValidationTest %7B%0A%0A    String%5B%5D validEmails = new String%5B%5D%7B%0A            %22john@mail.com%22,%0A            %22john-400@mail.com%22, %22john.400@mail.com%22,%0A            %22john441@john.com%22, %22john-100@john.net%22,%0A            %22john.600@john.com.au%22, %22john@2.com%22,%0A            %22john@gmail.com.com%22, %22john+100@gmail.com%22,%0A            %22john-100@mail-abcd.com%22, %22john-100@mail-abcd.fr%22%0A%0A    %7D;%0A%0A    String%5B%5D invalidEmails = new String%5B%5D%7B%0A            %22paul%22, %22paul@.net.my%22,%0A            %22paul123@gmail.a%22, %22paul123@.net%22, %22paul123@.net.net%22,%0A            %22.paul@paul.net%22, %22paul()*@gmail.net%22, %22paul@%25*.net%22,%0A            %22paul..2002@gmail.net%22, %22paul.@gmail.net%22,%0A            %22paul@paul@gmail.net%22, %22paul@gmail.net.1a%22,%0A            %2223ferf.%C3%A9%C2%A7%C3%A8!%C3%A7%C3%A0%22, %22$%5E%60%60ezg/.ddz%22, %22java..@...com%22%0A%0A    %7D;%0A%0A    /**%0A     * Test all valid emails.%0A     */%0A    @Test%0A    public void validEmailTest() %7B%0A        validTest(validEmails, true);%0A    %7D%0A%0A    /**%0A     * Test all invalid emails.%0A     */%0A    @Test%0A    public void invalidEmailTest() %7B%0A        validTest(invalidEmails, false);%0A    %7D%0A%0A%0A    /**%0A     * Test array of email%0A     *%0A     * @param emails array of emails%0A     * @param status assert status. True if we want%0A     *               to test the successful validation, otherwise, false.%0A     */%0A    public void validTest(String%5B%5D emails, boolean status) %7B%0A%0A        for (String email : emails) %7B%0A            boolean valid = EmailValidator.validate(email);%0A            Assert.assertEquals(valid, status);%0A        %7D%0A%0A    %7D%0A%7D%0A

add email validator unit tests