Skip to content

Instantly share code, notes, and snippets.

View yusufsoysal's full-sized avatar

Yusuf Ugur Soysal yusufsoysal

  • Dublin, Ireland
View GitHub Profile
@yusufsoysal
yusufsoysal / gist:47442b5ed1131c88bfff559820836a4e
Created March 18, 2017 16:36
Intellij IDEA JUnit4 Test Class Template
import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
#parse("File Header.java")
#set($lastIndex = $CLASS_NAME.lastIndexOf(".") + 1)
#set($onlyClassName = $CLASS_NAME.substring($lastIndex))
@yusufsoysal
yusufsoysal / gist:dcb6748e0fbcbece7311aa1b48371028
Created March 18, 2017 16:35
IntelliJ IDEA Java Class Template
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
#set($isClassService = $NAME.endsWith("Service"))
#set($isClassController = $NAME.endsWith("Controller"))
#if (${isClassController})
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;