@@ -23,12 +23,12 @@ class GeoTrellisPathSpec extends AnyFunSpec {
23
23
24
24
it(" should fail to parse without a layer" ) {
25
25
val path = GeoTrellisPath .parseOption(" file:///foo/bar?zoom=1" )
26
- assert(path == None )
26
+ assert(path.isEmpty )
27
27
}
28
28
29
29
it(" should fail to parse without a zoom" ) {
30
30
val path = GeoTrellisPath .parseOption(" file:///foo/bar?layer=baz" )
31
- assert(path == None )
31
+ assert(path.isEmpty )
32
32
}
33
33
34
34
it(" should parse a local absolute file path without scheme" ) {
@@ -59,7 +59,7 @@ class GeoTrellisPathSpec extends AnyFunSpec {
59
59
val path = GeoTrellisPath .parse(" file:///foo/bar?layer=baz&band_count=1&zoom=10" )
60
60
assert(path.layerName == " baz" )
61
61
assert(path.zoomLevel == 10 )
62
- assert(path.bandCount == Some (1 ))
62
+ assert(path.bandCount.contains (1 ))
63
63
}
64
64
65
65
it(" should parse hdfs scheme" ) {
@@ -74,6 +74,20 @@ class GeoTrellisPathSpec extends AnyFunSpec {
74
74
assert(path.layerName == " foo" )
75
75
}
76
76
77
+ it(" should parse hbase scheme" ) {
78
+ val path = GeoTrellisPath .parse(" hbase://zookeeper:2181?master=master_host&attributes=attributes_table&layers=layers_table&layer=foo&zoom=1" )
79
+ assert(path.value == " hbase://zookeeper:2181?master=master_host&attributes=attributes_table&layers=layers_table" )
80
+ assert(path.layerName == " foo" )
81
+ assert(path.zoomLevel == 1 )
82
+ }
83
+
84
+ it(" should parse accumulo scheme" ) {
85
+ val path = GeoTrellisPath .parse(" accumulo://root:@localhost/fake?attributes=attributes&layers=tiles&layer=foo&zoom=1" )
86
+ assert(path.value == " accumulo://root:@localhost/fake?attributes=attributes&layers=tiles" )
87
+ assert(path.layerName == " foo" )
88
+ assert(path.zoomLevel == 1 )
89
+ }
90
+
77
91
it(" should parse absolute file scheme with gt+ prefix" ) {
78
92
val path = GeoTrellisPath .parse(" gt+file:///absolute/path?layer=foo&zoom=1" )
79
93
assert(path.value == " file:///absolute/path" )
@@ -92,9 +106,9 @@ class GeoTrellisPathSpec extends AnyFunSpec {
92
106
assert(path.layerName == " foo" )
93
107
}
94
108
95
- it(" should ignore invalid parameters" ) {
109
+ it(" should not ignore invalid parameters" ) {
96
110
val path = GeoTrellisPath .parse(" file:///foo/bar?layer=baz&zoom=1&invalid=not&nope=1" )
97
- assert(path == GeoTrellisPath (" file:///foo/bar" , " baz" , 1 , None ))
111
+ assert(path == GeoTrellisPath (" file:///foo/bar?invalid=not&nope=1 " , " baz" , 1 , None ))
98
112
}
99
113
}
100
114
}
0 commit comments