Skip to content

Commit 7d4d832

Browse files
committed
Checkstyle fix for Storage XML command line sample.
1 parent 215ad2e commit 7d4d832

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

storage/xml-api/cmdline-sample/pom.xml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,11 @@
6565
<scope>test</scope>
6666
</dependency>
6767
<dependency>
68-
<groupId>org.hamcrest</groupId>
69-
<artifactId>hamcrest-core</artifactId>
70-
<version>1.3</version>
68+
<groupId>com.google.truth</groupId>
69+
<artifactId>truth</artifactId>
70+
<version>0.28</version>
7171
<scope>test</scope>
7272
</dependency>
73-
<dependency>
74-
<groupId>org.hamcrest</groupId>
75-
<artifactId>hamcrest-library</artifactId>
76-
<version>1.3</version>
77-
<scope>test</scope>
78-
</dependency>
79-
<dependency>
80-
<groupId>com.jcabi</groupId>
81-
<artifactId>jcabi-matchers</artifactId>
82-
<version>1.3</version>
83-
</dependency>
8473
</dependencies>
8574
<properties>
8675
<project.http.version>1.20.0</project.http.version>

storage/xml-api/cmdline-sample/src/test/java/StorageSampleTest.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright 2015 Google Inc. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,22 +15,19 @@
1515
*/
1616

1717
// [START StorageSampleTest]
18-
19-
import static com.jcabi.matchers.RegexMatchers.*;
20-
import static org.junit.Assert.assertThat;
18+
import static com.google.common.truth.Truth.assertThat;
2119

2220
import org.junit.Test;
2321

24-
import java.util.regex.Pattern;
25-
2622
public class StorageSampleTest {
2723
@Test
2824
public void testListBucket() throws Exception {
2925
String listing = StorageSample.listBucket("cloud-samples-tests");
30-
assertThat(listing, matchesPattern(
31-
".*<ListBucketResult.*"
32-
+ "<Name>cloud-samples-tests</Name>.*"
33-
+ "</ListBucketResult>.*"));
26+
assertThat(listing)
27+
.containsMatch(
28+
".*<ListBucketResult.*"
29+
+ "<Name>cloud-samples-tests</Name>.*"
30+
+ "</ListBucketResult>.*");
3431
}
3532
}
3633

0 commit comments

Comments
 (0)