package org.web3j.mavenplugin.solidity;

import org.junit.Test;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class SolCTest {

    @Test
    public void loadExecutable(){
        SolC solC = new SolC();

        assertTrue(solC.getWorkingDirectory().exists());
        assertFalse(solC.getCanonicalPath().isEmpty());
        assertFalse(solC.getCanonicalWorkingDirectory().isEmpty());
        assertTrue(solC.getCanonicalPath().contains(solC.getCanonicalWorkingDirectory()));
    }

}
@@ -80,32 +80,125 @@
 org.
-junit.Assert.assertFalse
+hamcrest.CoreMatchers.endsWith;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertThat
 ;%0Aim
@@ -264,16 +264,17 @@
 Test %7B%0A%0A
+%0A
     @Tes
@@ -295,12 +295,12 @@
 oid 
-load
+init
 Exec
@@ -307,16 +307,17 @@
 utable()
+ 
 %7B%0A      
@@ -404,64 +404,8 @@
 ));%0A
-        assertFalse(solC.getCanonicalPath().isEmpty());%0A
     
@@ -464,24 +464,24 @@
 isEmpty());%0A
-
         asse
@@ -566,9 +566,640 @@
 %0A    %7D%0A%0A
+%0A    @Test%0A    public void loadExecutableOnWindows() %7B%0A        System.setProperty(%22os.name%22, %22Windows 10%22);%0A%0A        SolC solC = new SolC();%0A%0A        assertThat(solC.getCanonicalPath(), endsWith(%22.exe%22));%0A    %7D%0A%0A%0A    @Test%0A    public void loadExecutableOnMac() %7B%0A        System.setProperty(%22os.name%22, %22mac 10.3%22);%0A%0A        SolC solC = new SolC();%0A%0A        assertThat(solC.getCanonicalPath(), endsWith(%22solc%22));%0A    %7D%0A%0A%0A    @Test%0A    public void loadExecutableOnLinux() %7B%0A        System.setProperty(%22os.name%22, %22af linux asdf%22);%0A%0A        SolC solC = new SolC();%0A%0A        assertThat(solC.getCanonicalPath(), endsWith(%22solc%22));%0A    %7D%0A%0A
 %7D

test the init of the solc library