Group testing modules (#3014)

* move security content from spring-security-rest-full

* swagger update

* move query language to new module

* rename spring-security-rest-full to spring-rest-full

* group persistence modules

* group testing modules

* try fix conflict
This commit is contained in:
Grzegorz Piwowarek
2017-11-12 11:16:46 +01:00
committed by GitHub
parent b383d83bf4
commit 776a01429e
236 changed files with 37 additions and 18 deletions
@@ -0,0 +1,20 @@
package org.baeldung.mocks.jmockit;
public class AdvancedCollaborator {
int i;
private int privateField = 5;
public AdvancedCollaborator(){}
public AdvancedCollaborator(String string) throws Exception{
i = string.length();
}
public String methodThatCallsPrivateMethod(int i){
return privateMethod() + i;
}
public int methodThatReturnsThePrivateField(){
return privateField;
}
private String privateMethod(){
return "default:";
}
class InnerAdvancedCollaborator{}
}
@@ -0,0 +1,12 @@
package org.baeldung.mocks.jmockit;
public class Collaborator {
public boolean collaborate(String string){
return false;
}
public void receive(boolean bool){
//NOOP
}
}
@@ -0,0 +1,19 @@
package org.baeldung.mocks.jmockit;
import java.util.List;
public interface ExpectationsCollaborator {
String methodForAny1(String s, int i, Boolean b);
void methodForAny2(Long l, List<String> lst);
String methodForWith1(String s, int i);
void methodForWith2(Boolean b, List<String> l);
String methodForNulls1(String s, List<String> l);
void methodForNulls2(String s, List<String> l);
void methodForTimes1();
void methodForTimes2();
void methodForTimes3();
void methodForArgThat(Object o);
String methodReturnsString();
int methodReturnsInt();
Object methodForDelegate(int i);
}
@@ -0,0 +1,7 @@
package org.baeldung.mocks.jmockit;
public class Model {
public String getInfo() {
return "info";
}
}
@@ -0,0 +1,10 @@
package org.baeldung.mocks.jmockit;
public class Performer {
private Collaborator collaborator;
public void perform(Model model){
boolean value = collaborator.collaborate(model.getInfo());
collaborator.receive(value);
}
}