- Author:
- David Nickerson <nickerso@users.sourceforge.net>
- Date:
- 2009-07-07 22:22:32+12:00
- Desc:
- renaming files in order to move to a single reference description for the entire tutorial
- Permanent Source URI:
- https://models.physiomeproject.org/workspace/a1/rawfile/0c824288680f5949ea1972a76176826599ef6d26/dojo-presentation/js/dojo/dojox/wire/tests/programmatic/TextAdapter.js
dojo.provide("dojox.wire.tests.programmatic.TextAdapter");
dojo.require("dojox.wire.TextAdapter");
tests.register("dojox.wire.tests.programmatic.TextAdapter", [
function test_TextAdapter_segments(t){
var source = {a: "a", b: "b", c: "c"};
var segments = [{property: "a"}, {property: "b"}, {property: "c"}];
var value = new dojox.wire.TextAdapter({object: source, segments: segments}).getValue();
t.assertEqual("abc", value);
},
function test_TextAdapter_delimiter(t){
var source = {a: "a", b: "b", c: "c"};
var segments = [{property: "a"}, {property: "b"}, {property: "c"}];
var value = new dojox.wire.TextAdapter({object: source, segments: segments, delimiter: "/"}).getValue();
t.assertEqual("a/b/c", value);
}
]);