debian/0000755000000000000000000000000012017427152007167 5ustar debian/rules0000755000000000000000000000150112017427117010245 0ustar #!/usr/bin/make -f PACKAGE := libtruth-java export JAVA_HOME := /usr/lib/jvm/java-7-openjdk-* export CLASSPATH := /usr/share/java/junit4.jar %: dh $@ --with javahelper override_dh_auto_build: jh_build --javacopts="-source 1.5 -target 1.5" libtruth-0.7.0.jar src override_dh_auto_install: mh_installpoms -p$(PACKAGE) mh_installjar -p$(PACKAGE) -l pom.xml libtruth-0.7.0.jar override_dh_auto_clean: dh_auto_clean mh_clean rm -rf *.jar get-orig-source: if [ -d truth ]; then \ echo "Please remove/rename existing 'truth' directory.\n"; \ else \ git clone https://github.com/truth0/truth.git ; \ cd truth ; \ git checkout e3b40022c6e6b6a4fe33c04f51fb5b0c60e31ece ; \ mv truth libtruth-java-0.7.0 ; \ GZIP=-9n tar --exclude .git -czvf libtruth-java_0.7.0.orig.tar.gz libtruth-java-0.7.0 ; \ fi debian/control0000644000000000000000000000115512017426575010604 0ustar Source: libtruth-java Section: java Priority: extra Maintainer: Brian Thomason Build-Depends: debhelper (>= 8.0.0), ant-optional, java7-jdk, javahelper Build-Depends-Indep: maven-repo-helper, junit4 Standards-Version: 3.9.3 Homepage: https://github.com/truth0/truth Package: libtruth-java Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: assertion/proposition framework for Java unit tests This package provides a assertion/proposition framework for Java unit tests. It is considered alpha software but is currently needed and used by the Guava GWT bindings. debian/source/0000755000000000000000000000000012017427150010465 5ustar debian/source/format0000644000000000000000000000001412017324510011667 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212017324510010357 0ustar 8 debian/changelog0000644000000000000000000000025212017324510011032 0ustar libtruth-java (0.7.0-1) unstable; urgency=low * Initial release (Closes: #686121) -- Brian Thomason Tue, 28 Aug 2012 16:52:51 +0000 debian/patches/0000755000000000000000000000000012017427150010614 5ustar debian/patches/use-old-expect-test.patch0000644000000000000000000000507112017324510015447 0ustar Description: Revert to using version of ExpectTest.java from 0.5 release Author: Brian Thomason Origin: upstream, https://raw.github.com/truth0/truth/84aa56ea5e48713b2555a5931160d65f13e23fe2/src/test/java/org/junit/contrib/truth/ExpectTest.java --- libtruth-java-0.7.0.orig/src/test/java/org/junit/contrib/truth/ExpectTest.java +++ libtruth-java-0.7.0/src/test/java/org/junit/contrib/truth/ExpectTest.java @@ -16,55 +16,33 @@ */ package org.junit.contrib.truth; +import java.util.Arrays; + +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.rules.MethodRule; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.junit.runners.model.FrameworkMethod; -import org.junit.runners.model.Statement; /** - * Tests (and effectively sample code) for the Expect verb (implemented as a - * rule) + * Tests (and effectively sample code) for the Expect + * verb (implemented as a rule) * * @author David Saff * @author Christian Gruber (cgruber@israfil.net) */ @RunWith(JUnit4.class) public class ExpectTest { - private Expect oopsNotARule = Expect.create(); - - private Expect EXPECT = Expect.create(); - private ExpectedException thrown = ExpectedException.none(); - - @Rule public MethodRule wrapper = new MethodRule() { - @Override - public Statement apply(Statement base, FrameworkMethod method, Object target) { - Statement expected = EXPECT.apply(base, method, target); - return thrown.apply(expected, method, target); - } - }; - - @Test - public void expectTrue() { - EXPECT.that(4).isEqualTo(4); - } - - @Test - public void expectFail() { - thrown.expectMessage("All failed expectations:"); - thrown.expectMessage("1. Not true that contains "); - thrown.expectMessage("2. Not true that contains "); - thrown.expectMessage("3. Not true that contains "); - EXPECT.that("abc").contains("x").and().contains("y").and().contains("z"); - } + @Rule public Expect EXPECT = Expect.create(); - @Test - public void warnWhenExpectIsNotRule() { - String message = "assertion made on Expect instance, but it's not enabled as a @Rule."; - thrown.expectMessage(message); - oopsNotARule.that(true).is(true); - } + @Test public void expectTrue() { + EXPECT.that(4).isEqualTo(4); + } + + @Ignore @Test public void expectFail() { + EXPECT.that("abc").contains("x") + .and().contains("y") + .and().contains("z"); + EXPECT.that(Arrays.asList(new String[]{"a", "b", "c"})).containsAnyOf("a", "c"); + } } debian/patches/series0000644000000000000000000000003212017324510012020 0ustar use-old-expect-test.patch debian/copyright0000644000000000000000000000342712017324510011122 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libtruth-java Source: https://github.com/truth0/truth/commit/e3b40022c6e6b6a4fe33c04f51fb5b0c60e31ece Files: * Copyright: 2011-2012 David Saff 2011-2012 Cristian Gruber License: Apache 2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems, the complete text of the Apache version 2.0 license can be found in "/usr/share/common-licenses/Apache-2.0". Files: debian/* Copyright: 2012 Brian Thomason License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/docs0000644000000000000000000000000712017324510010031 0ustar README