Skip to content

Commit

Permalink
Checkstyle fix for Storage XML command line sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast committed Mar 15, 2016
1 parent ea07af2 commit 38d24f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
17 changes: 3 additions & 14 deletions storage/xml-api/cmdline-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,11 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.28</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-matchers</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<properties>
<project.http.version>1.20.0</project.http.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,22 +15,19 @@
*/

// [START StorageSampleTest]

import static com.jcabi.matchers.RegexMatchers.*;
import static org.junit.Assert.assertThat;
import static com.google.common.truth.Truth.assertThat;

import org.junit.Test;

import java.util.regex.Pattern;

public class StorageSampleTest {
@Test
public void testListBucket() throws Exception {
String listing = StorageSample.listBucket("cloud-samples-tests");
assertThat(listing, matchesPattern(
".*<ListBucketResult.*"
+ "<Name>cloud-samples-tests</Name>.*"
+ "</ListBucketResult>.*"));
assertThat(listing)
.containsMatch(
".*<ListBucketResult.*"
+ "<Name>cloud-samples-tests</Name>.*"
+ "</ListBucketResult>.*");
}
}

Expand Down

0 comments on commit 38d24f0

Please sign in to comment.