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