[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/22: gnu: Add java-easymock.
From: |
Ricardo Wurmus |
Subject: |
09/22: gnu: Add java-easymock. |
Date: |
Wed, 10 May 2017 11:59:39 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit ae5898767bcb44efcce5ae8021b2df5cd22104c4
Author: Ricardo Wurmus <address@hidden>
Date: Thu Mar 2 12:22:27 2017 +0100
gnu: Add java-easymock.
* gnu/packages/java.scm (java-easymock): New variable.
---
gnu/packages/java.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 6e8e1d5..7c8283c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1368,3 +1368,64 @@ restrictions in libraries stating that classes must
require a default
constructor. Objenesis aims to overcome these restrictions by bypassing the
constructor on object instantiation.")
(license license:asl2.0)))
+
+(define-public java-easymock
+ (package
+ (name "java-easymock")
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/easymock/easymock/"
+ "archive/easymock-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "easymock.jar"
+ #:source-dir "core/src/main"
+ #:test-dir "core/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ ;; FIXME: Android support requires the following packages to be
+ ;; available: com.google.dexmaker.stock.ProxyBuilder
+ (add-after 'unpack 'delete-android-support
+ (lambda _
+ (with-directory-excursion
"core/src/main/java/org/easymock/internal"
+ (substitute* "MocksControl.java"
+ (("AndroidSupport.isAndroid\\(\\)") "false")
+ (("return classProxyFactory = new
AndroidClassProxyFactory\\(\\);") ""))
+ (delete-file "AndroidClassProxyFactory.java"))
+ #t))
+ (add-after 'unpack 'delete-broken-tests
+ (lambda _
+ (with-directory-excursion "core/src/test/java/org/easymock"
+ ;; This test depends on dexmaker.
+ (delete-file "tests2/ClassExtensionHelperTest.java")
+
+ ;; This is not a test.
+ (delete-file "tests/BaseEasyMockRunnerTest.java")
+
+ ;; This test should be executed with a different runner...
+ (delete-file "tests2/EasyMockAnnotationsTest.java")
+ ;; ...but deleting it means that we also have to delete these
+ ;; dependent files.
+ (delete-file "tests2/EasyMockRunnerTest.java")
+ (delete-file "tests2/EasyMockRuleTest.java")
+
+ ;; This test fails because the file "easymock.properties" does
+ ;; not exist.
+ (delete-file "tests2/EasyMockPropertiesTest.java"))
+ #t)))))
+ (inputs
+ `(("java-asm" ,java-asm)
+ ("java-cglib" ,java-cglib)
+ ("java-objenesis" ,java-objenesis)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-hamcrest-core" ,java-hamcrest-core)))
+ (home-page "http://easymock.org")
+ (synopsis "Java library providing mock objects for unit tests")
+ (description "EasyMock is a Java library that provides an easy way to use
+mock objects in unit testing.")
+ (license license:asl2.0)))
- 08/22: gnu: Add java-objenesis., (continued)
- 08/22: gnu: Add java-objenesis., Ricardo Wurmus, 2017/05/10
- 06/22: gnu: Add java-asm., Ricardo Wurmus, 2017/05/10
- 21/22: gnu: Add java-jmock-1., Ricardo Wurmus, 2017/05/10
- 04/22: gnu: Add java-plexus-utils., Ricardo Wurmus, 2017/05/10
- 05/22: gnu: Add java-plexus-interpolation., Ricardo Wurmus, 2017/05/10
- 02/22: ant-build-system: Add default "check" target., Ricardo Wurmus, 2017/05/10
- 13/22: gnu: Add java-jmh., Ricardo Wurmus, 2017/05/10
- 15/22: gnu: Add java-commons-io., Ricardo Wurmus, 2017/05/10
- 16/22: gnu: Add java-commons-lang., Ricardo Wurmus, 2017/05/10
- 19/22: gnu: Add java-commons-codec., Ricardo Wurmus, 2017/05/10
- 09/22: gnu: Add java-easymock.,
Ricardo Wurmus <=
- 11/22: gnu: java-hamcrest-core: Install all jars without version suffix., Ricardo Wurmus, 2017/05/10
- 18/22: gnu: Add java-commons-cli., Ricardo Wurmus, 2017/05/10
- 14/22: gnu: Add java-commons-collections4., Ricardo Wurmus, 2017/05/10
- 03/22: guix: Add java-utils., Ricardo Wurmus, 2017/05/10
- 22/22: gnu: java-hamcrest-core: Declare test target., Ricardo Wurmus, 2017/05/10
- 17/22: gnu: Add java-commons-lang3., Ricardo Wurmus, 2017/05/10