You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/06/12 23:37:15 UTC
[1/2] git commit: Remove file accidentally leaked from the 5.4 master
branch
Updated Branches:
refs/heads/5.3 781da0b88 -> 2f490ecb4
Remove file accidentally leaked from the 5.4 master branch
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2f490ecb
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2f490ecb
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2f490ecb
Branch: refs/heads/5.3
Commit: 2f490ecb46d9906ee0caa7983fd7271792fd7261
Parents: 464160f
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Jun 12 14:36:52 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Jun 12 14:36:52 2012 -0700
----------------------------------------------------------------------
.../apache/tapestry5/ioc/util/OrdererSpec.groovy | 171 ---------------
1 files changed, 0 insertions(+), 171 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2f490ecb/tapestry-ioc/src/test/groovy/org/apache/tapestry5/ioc/util/OrdererSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/org/apache/tapestry5/ioc/util/OrdererSpec.groovy b/tapestry-ioc/src/test/groovy/org/apache/tapestry5/ioc/util/OrdererSpec.groovy
deleted file mode 100644
index 49e5095..0000000
--- a/tapestry-ioc/src/test/groovy/org/apache/tapestry5/ioc/util/OrdererSpec.groovy
+++ /dev/null
@@ -1,171 +0,0 @@
-package org.apache.tapestry5.ioc.util
-
-import org.apache.tapestry5.ioc.internal.util.Orderer
-import org.apache.tapestry5.ioc.internal.util.UtilMessages
-import org.slf4j.Logger
-import spock.lang.Specification
-
-class OrdererSpec extends Specification {
-
- Logger logger = Mock()
-
- def "the order of the values is unchanged when there are no dependencies"() {
-
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY"
- add "wilma", "WILMA"
- add "betty", "BETTY"
- }
-
- then:
-
- orderer.ordered == ["FRED", "BARNEY", "WILMA", "BETTY"]
- }
-
- def "an override can change order and value"() {
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY"
- add "wilma", "WILMA"
- add "betty", "BETTY"
-
- override "barney", "Mr. Rubble", "before:*"
- }
-
- then:
-
- orderer.ordered == ["Mr. Rubble", "FRED", "WILMA", "BETTY"]
- }
-
- def "an override must match a previously added id"() {
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY"
- add "wilma", "WILMA"
- add "betty", "BETTY"
-
- override "bambam", "Mr. Rubble JR.", "before:*"
- }
-
- then:
-
- IllegalArgumentException e = thrown()
-
- e.message == "Override for object 'bambam' is invalid as it does not match an existing object."
- }
-
- def "a missing constraint type is logged as a warning"() {
-
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY", "fred"
- add "wilma", "WILMA"
- add "betty", "BETTY"
- }
-
- then:
-
- logger.warn(UtilMessages.constraintFormat("fred", "barney"))
-
- orderer.ordered == ["FRED", "BARNEY", "WILMA", "BETTY"]
- }
-
- def "an unknown constraint type is logged as a warning"() {
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY", "nearby:fred"
- add "wilma", "WILMA"
- add "betty", "BETTY"
- }
-
- then:
-
- logger.warn(UtilMessages.constraintFormat("nearby:fred", "barney"))
-
- orderer.ordered == ["FRED", "BARNEY", "WILMA", "BETTY"]
- }
-
- def "null values are not included in the result"() {
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY"
- add "zippo", null
- add "wilma", "WILMA"
- add "groucho", null
- add "betty", "BETTY"
- }
-
- then:
-
- orderer.ordered == ["FRED", "BARNEY", "WILMA", "BETTY"]
- }
-
- def "duplicate ids are ignored"() {
- def orderer = new Orderer(logger)
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY"
- add "wilma", "WILMA"
- }
-
- when:
-
- orderer.add("Fred", "Fred 2")
-
- then:
-
- // Notice it uses the previously added id, whose case is considered canonical
- logger.warn(UtilMessages.duplicateOrderer("fred"))
-
- when:
-
- orderer.add "betty", "BETTY"
-
- then:
-
- orderer.ordered == ["FRED", "BARNEY", "WILMA", "BETTY"]
- }
-
- def "the special before:* moves the value to the front of the list"() {
- def orderer = new Orderer(logger)
-
- when:
-
- orderer.with {
- add "fred", "FRED"
- add "barney", "BARNEY", "before:*"
- add "wilma", "WILMA"
- add "betty", "BETTY"
- }
-
- then:
-
- orderer.ordered == ["BARNEY", "FRED", "WILMA", "BETTY"]
- }
-}