1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.mock.mojo;
18
19 import org.kuali.student.contract.model.ServiceContractModel;
20 import org.kuali.student.contract.model.ServiceMethod;
21 import org.kuali.student.contract.model.impl.ServiceContractModelPescXsdLoader;
22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
24
25 import java.util.List;
26
27
28
29
30
31
32 public class ConformanceTestWriterForOneService extends MockImplWriterForOneService {
33
34 private static Logger log = LoggerFactory.getLogger(ConformanceTestWriterForOneService.class);
35
36
37
38
39
40 public ConformanceTestWriterForOneService
41 (ServiceContractModel model,
42 String directory,
43 String rootPackage,
44 String servKey,
45 boolean isR1) {
46 super (model, directory, rootPackage, servKey, isR1);
47 }
48
49
50
51
52
53
54
55
56 public void write() {
57 List<ServiceMethod> methods = finder.getServiceMethodsInService(servKey);
58 if (methods.size() == 0) {
59 log.warn("No methods defined for servKey: " + servKey);
60 return;
61 }
62
63
64 log.info("Generating Conformance Tests for " + servKey);
65 new ConformanceTestBaseCrudClassServiceWriter(model, directory, rootPackage, servKey, methods, isR1).write();
66 new ConformanceTestExtendedCrudClassServiceWriter(model, directory, rootPackage, servKey, methods, isR1).write();
67 }
68 }