Skip to content

Commit 635b2a2

Browse files
committed
fix: tests
1 parent e85ff45 commit 635b2a2

4 files changed

Lines changed: 78 additions & 9 deletions

File tree

carrental-web/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,19 @@
114114
<dependency>
115115
<groupId>junit</groupId>
116116
<artifactId>junit</artifactId>
117-
<scope>test</scope>
117+
<scope>compile,test</scope>
118118
</dependency>
119119

120120
<dependency>
121121
<groupId>org.mockito</groupId>
122122
<artifactId>mockito-core</artifactId>
123-
<scope>test</scope>
123+
<scope>compile,test</scope>
124124
</dependency>
125125

126126
<dependency>
127127
<groupId>org.jboss.resteasy</groupId>
128128
<artifactId>resteasy-client</artifactId>
129-
<scope>test</scope>
129+
<scope>compile,test</scope>
130130
</dependency>
131131

132132
<!-- JSR-303 (Bean Validation) Implementation -->

carrental-web/src/test/java/ch/xxx/carrrental/ui/rest/model/CrDetailResourceTest.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
1+
/**
2+
* Copyright 2016 Sven Loesekann
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
116
package ch.xxx.carrrental.ui.rest.model;
217

18+
import java.util.Locale;
19+
20+
import javax.ws.rs.core.Response;
321

22+
import org.junit.Assert;
23+
import org.junit.Before;
24+
import org.junit.Test;
25+
import org.mockito.Mockito;
426

27+
import ch.xxx.carrental.ui.dto.CrDetail;
28+
import ch.xxx.carrental.ui.rest.model.CrDetailResource;
29+
import ch.xxx.carrental.ui.service.CrDetailService;
530

631
public class CrDetailResourceTest {
7-
/*
832
CrDetailService service;
933

1034
@Before
@@ -43,5 +67,4 @@ public void updateTest() {
4367
Response resp = testee.updateDetails(new CrDetail());
4468
Assert.assertEquals(200, resp.getStatus());
4569
}
46-
*/
4770
}

carrental-web/src/test/java/ch/xxx/carrrental/ui/rest/model/CrTableResourceTest.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
1+
/**
2+
* Copyright 2016 Sven Loesekann
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
116
package ch.xxx.carrrental.ui.rest.model;
217

18+
import java.math.BigDecimal;
19+
import java.util.Arrays;
20+
import java.util.Calendar;
21+
import java.util.List;
22+
import java.util.Locale;
23+
24+
import javax.ws.rs.core.Response;
25+
26+
import org.junit.Assert;
27+
import org.junit.Before;
28+
import org.junit.Test;
29+
import org.mockito.Mockito;
30+
31+
import ch.xxx.carrental.ui.dto.CrTableRow;
32+
import ch.xxx.carrental.ui.rest.model.CrTableResource;
33+
import ch.xxx.carrental.ui.service.CrTableService;
334

435
public class CrTableResourceTest {
5-
/*
636
CrTableService service;
737

838
@Before
@@ -27,5 +57,4 @@ public void testGetAll() {
2757
Response resp = testee.getAll("1", "en");
2858
Assert.assertEquals(200, resp.getStatus());
2959
}
30-
*/
3160
}

carrental-web/src/test/java/ch/xxx/carrrental/ui/rest/model/UrlTest.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1+
/**
2+
* Copyright 2016 Sven Loesekann
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
116
package ch.xxx.carrrental.ui.rest.model;
217

18+
import org.junit.Assert;
19+
import org.junit.Test;
320

421
public class UrlTest {
5-
/*
22+
623
private String regexStr = "^\\/de\\/[a-zA-Z_0-9\\/]+$";
724

825
@Test
@@ -28,5 +45,5 @@ public void url4() {
2845
String testStr = "/de/";
2946
Assert.assertFalse(testStr.matches(regexStr));
3047
}
31-
*/
48+
3249
}

0 commit comments

Comments
 (0)