Skip to content

Instantly share code, notes, and snippets.

View FranckSilvestre's full-sized avatar

Franck Silvestre FranckSilvestre

View GitHub Profile
@FranckSilvestre
FranckSilvestre / ActiviteServiceTest.groovy
Last active October 21, 2016 09:54
FriendsOfMine : classe de tests unitaire pour la classe ActiviteService
package friendsofmine
import friendsofmine.repositories.ActiviteRepository
import org.springframework.data.repository.PagingAndSortingRepository
import spock.lang.Specification
/**
* Created by franck on 18/10/2016.
*/
class ActiviteServiceTest extends Specification {
@FranckSilvestre
FranckSilvestre / ActiviteServiceITest.groovy
Created October 18, 2016 13:38
FriendsOfMine : classe de tests d'intégration pour la classe ActiviteService
package friendsofmine
import friendsofmine.repositories.ActiviteRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.data.repository.PagingAndSortingRepository
import org.springframework.test.context.ContextConfiguration
import spock.lang.Specification
import javax.validation.ConstraintViolationException
@FranckSilvestre
FranckSilvestre / ActiviteTest.groovy
Created October 18, 2016 14:25
FriendsOfMine : test sur activité avec responsable
package friendsofmine
import spock.lang.Specification
import spock.lang.Unroll
import javax.validation.Validation
import javax.validation.Validator
import javax.validation.ValidatorFactory
@FranckSilvestre
FranckSilvestre / UtilisateurTest.groovy
Created October 18, 2016 14:37
FriendsOfMine : tests utilisateur avec relation vers activites
package friendsofmine
import spock.lang.Specification
import spock.lang.Unroll
import javax.validation.Validation
import javax.validation.Validator
import javax.validation.ValidatorFactory
@FranckSilvestre
FranckSilvestre / ActiviteServiceITest.groovy
Last active November 3, 2016 15:01
FriendsOfMine : tests intégration sur ActiviteService prenant en compte la relation d'activité vers utilisateur
package friendsofmine
import friendsofmine.repositories.ActiviteRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.data.repository.PagingAndSortingRepository
import org.springframework.test.context.ContextConfiguration
import spock.lang.Specification
import javax.validation.ConstraintViolationException
@FranckSilvestre
FranckSilvestre / ActiviteServiceTest.groovy
Last active November 3, 2016 14:53
FriendsOfMine : test de la méthode findAllActivites
package friendsofmine
import friendsofmine.repositories.ActiviteRepository
import org.springframework.data.repository.PagingAndSortingRepository
import spock.lang.Specification
/**
* Created by franck on 18/10/2016.
*/
class ActiviteServiceTest extends Specification {
@FranckSilvestre
FranckSilvestre / ActiviteServiceITest.groovy
Last active November 3, 2016 15:02
FriendsOfMine : test de la méthode findAllActivites
package friendsofmine
import friendsofmine.repositories.ActiviteRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.data.repository.PagingAndSortingRepository
import org.springframework.test.context.ContextConfiguration
import org.springframework.transaction.annotation.Transactional
import spock.lang.Specification
@FranckSilvestre
FranckSilvestre / ActiviteServiceITest.groovy
Last active November 3, 2016 15:03
FriendsOfMine : introduction de la classe Bootstrap
package friendsofmine
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ContextConfiguration
import org.springframework.transaction.annotation.Transactional
import spock.lang.Specification
import javax.validation.ConstraintViolationException
@FranckSilvestre
FranckSilvestre / BootstrapTest.groovy
Created October 19, 2016 14:56
FriendsOfMine : Bootstrap test class
package friendsofmine
import spock.lang.Specification
/**
* Created by franck on 19/10/2016.
*/
class BootstrapTest extends Specification {
void "test bootstrap init method call the initialisation service"() {
@FranckSilvestre
FranckSilvestre / ActiviteControllerTest.groovy
Created October 20, 2016 13:29
FriendsOfMine : test unitaire sur ActiviteController
package friendsofmine
import spock.lang.Specification
/**
* Created by franck on 20/10/2016.
*/
class ActiviteControllerTest extends Specification {
private ActiviteService activiteService