From 38d24f0694ede9cc632c6e24af660b53b4e14989 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 15 Mar 2016 16:16:17 -0700 Subject: [PATCH] Checkstyle fix for Storage XML command line sample. --- storage/xml-api/cmdline-sample/pom.xml | 17 +++-------------- .../src/test/java/StorageSampleTest.java | 17 +++++++---------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/storage/xml-api/cmdline-sample/pom.xml b/storage/xml-api/cmdline-sample/pom.xml index fe0faaaf755..300792ac037 100644 --- a/storage/xml-api/cmdline-sample/pom.xml +++ b/storage/xml-api/cmdline-sample/pom.xml @@ -65,22 +65,11 @@ test - org.hamcrest - hamcrest-core - 1.3 + com.google.truth + truth + 0.28 test - - org.hamcrest - hamcrest-library - 1.3 - test - - - com.jcabi - jcabi-matchers - 1.3 - 1.20.0 diff --git a/storage/xml-api/cmdline-sample/src/test/java/StorageSampleTest.java b/storage/xml-api/cmdline-sample/src/test/java/StorageSampleTest.java index a1030b6d8e5..94b160664e8 100644 --- a/storage/xml-api/cmdline-sample/src/test/java/StorageSampleTest.java +++ b/storage/xml-api/cmdline-sample/src/test/java/StorageSampleTest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -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( - ".*cloud-samples-tests.*" - + ".*")); + assertThat(listing) + .containsMatch( + ".*cloud-samples-tests.*" + + ".*"); } }