Skip to content

Commit 3a7752f

Browse files
committed
Adapting tests.
1 parent 22beeb5 commit 3a7752f

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

test.eowcs.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
55
<script type="text/javascript" src="http://www.rfk.id.au/static/scratch/jquery.xmlns.js"></script>
66
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.12.0.js"></script>
7-
<script type="text/javascript" src="./libcoverage.wcs.js"></script>
8-
<script type="text/javascript" src="./libcoverage.eowcs.js"></script>
7+
<script type="text/javascript" src="./build/libcoverage.js"></script>
98

109
<script>
1110
$(document).ready(function(){

test.html

+6-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!--<script type="text/javascript" src="http://www.rfk.id.au/static/scratch/jquery.xmlns.js"></script>-->
66
<!--<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>-->
77
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.20.0.js"></script>
8-
<script type="text/javascript" src="./libcoverage.wcs.js"></script>
8+
<script type="text/javascript" src="./build/libcoverage.js"></script>
99

1010
<script>
1111
$(document).ready(function(){
@@ -56,22 +56,22 @@
5656
var url = wcsk.getCoverageURL(baseUrl, "id1", {
5757
bbox: [1, 2, 3, 4]
5858
});
59-
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&subset=x,http://www.opengis.net/def/crs/EPSG/0/4326(1,3)&subset=y,http://www.opengis.net/def/crs/EPSG/0/4326(2,4)");
59+
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&subset=x(1,3)&subset=y(2,4)");
6060
});
6161

6262
test("GetCoverage subsetX", function() {
6363
var url = wcsk.getCoverageURL(baseUrl, "id1", {
6464
subsetX: [1, 3],
6565
subsetCRS: "http://www.opengis.net/def/crs/EPSG/0/3857"
6666
});
67-
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&subset=x,http://www.opengis.net/def/crs/EPSG/0/3857(1,3)");
67+
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&subset=x(1,3)&subsettingCrs=http://www.opengis.net/def/crs/EPSG/0/3857");
6868
});
6969

7070
test("GetCoverage size", function() {
7171
var url = wcsk.getCoverageURL(baseUrl, "id1", {
7272
size: [100, 100]
7373
});
74-
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&size=x(100)&size=y(100)");
74+
equal(url, "http://www.example.com/?service=wcs&version=2.0.0&request=getcoverage&coverageid=id1&scalesize=x(100),y(100)");
7575
});
7676

7777
// TODO: more GetCov tests
@@ -260,25 +260,16 @@
260260
});
261261

262262
test("ExceptionReport", function() {
263-
// save old config option
264-
var originalOption = wcsp.options.throwOnException;
265-
266-
wcsp.options.throwOnException = false;
267-
268-
var obj = wcsp.parse($("#exceptionReport").text());
263+
var obj = wcsp.parse($("#exceptionReport").text(), {throwOnException: false});
269264
deepEqual(obj, {
270265
code: "InvalidParameterValue",
271266
locator: "request",
272267
text: "Invalid parameter 'Foo'."
273268
});
274269

275-
wcsp.options.throwOnException = true;
276270
raises(function() {
277-
wcsp.parse($("#exceptionReport").text());
271+
wcsp.parse($("#exceptionReport").text(), {throwOnException: true});
278272
}, "Invalid parameter 'Foo'.");
279-
280-
// reset option
281-
wcsp.options.throwOnException = originalOption;
282273
});
283274

284275
});

0 commit comments

Comments
 (0)