Location: A review of cardiac cellular electrophysiology models @ 98909b01e6b2 / dojo-presentation / js / dojo / dojox / wire / tests / programmatic / TextAdapter.js

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2009-07-07 17:11:57+12:00
Desc:
update for modified HH graphs in tutorial description
Permanent Source URI:
https://models.physiomeproject.org/workspace/a1/rawfile/98909b01e6b21653a5e1cd28865dd259c586d490/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);
	}

]);