File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/test/groovy/com/github/magneticflux/rss/namespaces/standard/elements Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.github.magneticflux.rss.namespaces.standard.elements
2+
3+ import com.github.magneticflux.rss.PersisterSpecification
4+ import spock.lang.Unroll
5+
6+ class GuidTest extends PersisterSpecification {
7+ @Unroll
8+ def ' enclosure #object read/write' () {
9+
10+ expect : ' the output XML equals the given XML'
11+ persister. write(object) == xml
12+
13+ and : ' the input object equals the given object'
14+ persister. read(Guid , xml) == object
15+
16+ where :
17+ isPermaLinkRaw | text | xml
18+ ' true' | ' testText' | """ <guid isPermaLink="$isPermaLinkRaw ">$text </guid>"""
19+ ' false' | ' testText' | """ <guid isPermaLink="$isPermaLinkRaw ">$text </guid>"""
20+ null | ' testText' | """ <guid>$text </guid>"""
21+ object = new Guid (isPermaLinkRaw, text)
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments