package de.fau.osr.core.vcs.base;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Created by Rajab Kaoneka on 18.05.2015.
 */
public class CommitTest {

    @Test
    public void CommitConstructor_idField_Test(){
        Commit commitToTest = new Commit("new_id", null, null, null);
        assertEquals("commit id should be equal the initialization id", "new_id", commitToTest.id);
    }

    @Test
    public void CommitConstructor_messageField_Test(){
        Commit commitToTest = new Commit(null, "msg ok", null, null);
        assertEquals("message should be equal the initialization message", "msg ok", commitToTest.message);
    }
}
@@ -402,16 +402,428 @@
 %0A    %7D%0A%0A
+    public void CommitConstructor_CommitIdInitializedWithNoUsualChars_allTheCharsReturnedProperly()%7B%0A        String%5B%5D ids = %7B%22   %22, %22$&/&$//%22, %2209084%C2%A7%C2%A7%C2%A7%22, %22 kl%2545$$%25$%25%22, %22%5C%22%5C%22__ __%5C%22%5C%22%22, %22%22, null%7D;%0A        for (String id : ids)%7B%0A            Commit commitToTest = new Commit(id, null, null, null);%0A            assertEquals(%22commit id should be equal the initialization id%22, id, commitToTest.id);%0A        %7D%0A    %7D%0A%0A
     @Tes
@@ -1063,9 +1063,11 @@
 ;%0A    %7D%0A
+%0A%0A
 %7D

Test for commit, testing message initialization with unusual chars for id