aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-04-23 15:17:38 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2014-04-23 15:17:48 +0200
commitb131f3d7faae41ae931f522b4ae208c69aab5dee (patch)
tree86c3d1276686bfd3e3c003d004895b72842824cc /sonar-testing-harness/src/main
parent78768f07309629c4ade43ba5124cb5e076438add (diff)
downloadsonarqube-b131f3d7faae41ae931f522b4ae208c69aab5dee.tar.gz
sonarqube-b131f3d7faae41ae931f522b4ae208c69aab5dee.zip
Remove the class MoreConditions from sonar-testing-harness
Diffstat (limited to 'sonar-testing-harness/src/main')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/MoreConditions.java71
1 files changed, 0 insertions, 71 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/MoreConditions.java b/sonar-testing-harness/src/main/java/org/sonar/test/MoreConditions.java
deleted file mode 100644
index 16681d6f88f..00000000000
--- a/sonar-testing-harness/src/main/java/org/sonar/test/MoreConditions.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.test;
-
-import com.google.common.base.CharMatcher;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.fest.assertions.Condition;
-
-import java.util.Collection;
-
-/**
- * Conditions for use with FestAssert.
- */
-public final class MoreConditions {
- private static final CharMatcher EOLS = CharMatcher.anyOf("\n\r");
-
- private MoreConditions() {
- // static utility class
- }
-
- public static Condition<String> equalsIgnoreEOL(String text) {
- final String strippedText = EOLS.removeFrom(text);
-
- return new Condition<String>() {
- @Override
- public boolean matches(String value) {
- return EOLS.removeFrom(value).equals(strippedText);
- }
- }.as("equal to " + strippedText);
- }
-
- public static Condition<Collection<?>> contains(final Object expected) {
- return new Condition<Collection<?>>() {
- @Override
- public boolean matches(Collection<?> collection) {
- for (Object actual : collection) {
- if (EqualsBuilder.reflectionEquals(expected, actual)) {
- return true;
- }
- }
- return false;
- }
- };
- }
-
- public static Condition<Object> reflectionEqualTo(final Object expected) {
- return new Condition<Object>() {
- @Override
- public boolean matches(Object actual) {
- return EqualsBuilder.reflectionEquals(expected, actual);
- }
- };
- }
-}