File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
src/test/groovy/com/github/magneticflux/rss/namespaces/standard/elements Expand file tree Collapse file tree 1 file changed +25
-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+ import static com.github.magneticflux.rss.UrlUtils.testUrl
7+
8+ class SourceTest extends PersisterSpecification {
9+ @Unroll
10+ def ' enclosure #object read/write' () {
11+
12+ expect : ' the output XML equals the given XML'
13+ persister. write(object) == xml
14+
15+ and : ' the input object equals the given object'
16+ persister. read(Source , xml) == object
17+
18+ where :
19+ url | text | xml
20+ testUrl() | ' testText' | """ <source url="$url ">$text </source>"""
21+ testUrl() | null | """ <source url="$url "/>"""
22+
23+ object = new Source (url, text)
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments