質問編集履歴
2
位置修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -276,6 +276,48 @@
|
|
276
276
|
|
277
277
|
```
|
278
278
|
|
279
|
+
**追記**
|
280
|
+
|
281
|
+
**RegisterLogicTest2**
|
282
|
+
|
283
|
+
```
|
284
|
+
|
285
|
+
class RegisterLogicTest2 {
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
private static JdbcDataSource dataSource;
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
public void getDataSource() throws Exception {
|
294
|
+
|
295
|
+
GetDataSourceLogic gdlogic=new GetDataSourceLogic();
|
296
|
+
|
297
|
+
dataSource=gdlogic.getH2DataSource();
|
298
|
+
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
private static final String JDBC_DRIVER = org.h2.Driver.class.getName();
|
304
|
+
|
305
|
+
private static final String JDBC_URL = dataSource.getURL();//NullPointer
|
306
|
+
|
307
|
+
private static final String USER = dataSource.getUser();
|
308
|
+
|
309
|
+
private static final String PASSWORD = dataSource.getPassword();
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
private static IDatabaseTester dbTester;
|
314
|
+
|
315
|
+
:
|
316
|
+
|
317
|
+
:
|
318
|
+
|
319
|
+
```
|
320
|
+
|
279
321
|
**Ecilpseの実効pom** (抜粋)
|
280
322
|
|
281
323
|
```
|
@@ -368,47 +410,7 @@
|
|
368
410
|
|
369
411
|
```
|
370
412
|
|
371
|
-
|
413
|
+
|
372
|
-
|
373
|
-
**RegisterLogicTest2**
|
374
|
-
|
375
|
-
```
|
376
|
-
|
377
|
-
class RegisterLogicTest2 {
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
private static JdbcDataSource dataSource;
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
public void getDataSource() throws Exception {
|
386
|
-
|
387
|
-
GetDataSourceLogic gdlogic=new GetDataSourceLogic();
|
388
|
-
|
389
|
-
dataSource=gdlogic.getH2DataSource();
|
390
|
-
|
391
|
-
}
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
private static final String JDBC_DRIVER = org.h2.Driver.class.getName();
|
396
|
-
|
397
|
-
private static final String JDBC_URL = dataSource.getURL();//NullPointer
|
398
|
-
|
399
|
-
private static final String USER = dataSource.getUser();
|
400
|
-
|
401
|
-
private static final String PASSWORD = dataSource.getPassword();
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
private static IDatabaseTester dbTester;
|
406
|
-
|
407
|
-
:
|
408
|
-
|
409
|
-
:
|
410
|
-
|
411
|
-
```
|
412
414
|
|
413
415
|
### 補足情報
|
414
416
|
|
1
追記(error,logic)
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,6 +108,118 @@
|
|
108
108
|
|
109
109
|
```
|
110
110
|
|
111
|
+
java.lang.ExceptionInInitializerError
|
112
|
+
|
113
|
+
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
114
|
+
|
115
|
+
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
|
116
|
+
|
117
|
+
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
|
118
|
+
|
119
|
+
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
|
120
|
+
|
121
|
+
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
|
122
|
+
|
123
|
+
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
|
124
|
+
|
125
|
+
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
|
126
|
+
|
127
|
+
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132)
|
128
|
+
|
129
|
+
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:111)
|
130
|
+
|
131
|
+
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:60)
|
132
|
+
|
133
|
+
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
|
134
|
+
|
135
|
+
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
|
136
|
+
|
137
|
+
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
|
138
|
+
|
139
|
+
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
|
140
|
+
|
141
|
+
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
|
142
|
+
|
143
|
+
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
|
144
|
+
|
145
|
+
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
|
146
|
+
|
147
|
+
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
|
148
|
+
|
149
|
+
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$8(ClassBasedTestDescriptor.java:371)
|
150
|
+
|
151
|
+
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
|
152
|
+
|
153
|
+
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:369)
|
154
|
+
|
155
|
+
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:193)
|
156
|
+
|
157
|
+
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:77)
|
158
|
+
|
159
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132)
|
160
|
+
|
161
|
+
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
|
162
|
+
|
163
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
|
164
|
+
|
165
|
+
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
|
166
|
+
|
167
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
|
168
|
+
|
169
|
+
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
|
170
|
+
|
171
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
|
172
|
+
|
173
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
|
174
|
+
|
175
|
+
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
|
176
|
+
|
177
|
+
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
|
178
|
+
|
179
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
|
180
|
+
|
181
|
+
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
|
182
|
+
|
183
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
|
184
|
+
|
185
|
+
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
|
186
|
+
|
187
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
|
188
|
+
|
189
|
+
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
|
190
|
+
|
191
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
|
192
|
+
|
193
|
+
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
|
194
|
+
|
195
|
+
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
|
196
|
+
|
197
|
+
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
|
198
|
+
|
199
|
+
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
|
200
|
+
|
201
|
+
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
|
202
|
+
|
203
|
+
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
|
204
|
+
|
205
|
+
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
|
206
|
+
|
207
|
+
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
|
208
|
+
|
209
|
+
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
|
210
|
+
|
211
|
+
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
|
212
|
+
|
213
|
+
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
|
214
|
+
|
215
|
+
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
|
216
|
+
|
217
|
+
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
|
218
|
+
|
219
|
+
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
|
220
|
+
|
221
|
+
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
|
222
|
+
|
111
223
|
Caused by: java.lang.NullPointerException
|
112
224
|
|
113
225
|
at test.model.logic.RegisterLogicTest2.<clinit>(RegisterLogicTest2.java:35)
|
@@ -256,7 +368,47 @@
|
|
256
368
|
|
257
369
|
```
|
258
370
|
|
259
|
-
|
371
|
+
**追記**
|
372
|
+
|
373
|
+
**RegisterLogicTest2**
|
374
|
+
|
375
|
+
```
|
376
|
+
|
377
|
+
class RegisterLogicTest2 {
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
private static JdbcDataSource dataSource;
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
public void getDataSource() throws Exception {
|
386
|
+
|
387
|
+
GetDataSourceLogic gdlogic=new GetDataSourceLogic();
|
388
|
+
|
389
|
+
dataSource=gdlogic.getH2DataSource();
|
390
|
+
|
391
|
+
}
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
private static final String JDBC_DRIVER = org.h2.Driver.class.getName();
|
396
|
+
|
397
|
+
private static final String JDBC_URL = dataSource.getURL();//NullPointer
|
398
|
+
|
399
|
+
private static final String USER = dataSource.getUser();
|
400
|
+
|
401
|
+
private static final String PASSWORD = dataSource.getPassword();
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
private static IDatabaseTester dbTester;
|
406
|
+
|
407
|
+
:
|
408
|
+
|
409
|
+
:
|
410
|
+
|
411
|
+
```
|
260
412
|
|
261
413
|
### 補足情報
|
262
414
|
|