New example project.

Generate jasmine-standalone-x.x.x.zip.
This commit is contained in:
Lee Byrd & Christian Williams
2010-06-24 17:15:06 -07:00
parent 22065fafad
commit 1057596665
9 changed files with 174 additions and 45 deletions

22
example/src/Player.js Normal file
View File

@@ -0,0 +1,22 @@
function Player() {
}
Player.prototype.play = function(song) {
this.currentlyPlayingSong = song;
this.isPlaying = true;
};
Player.prototype.pause = function() {
this.isPlaying = false;
};
Player.prototype.resume = function() {
if (this.isPlaying) {
throw new Error("song is already playing");
}
this.isPlaying = true;
};
Player.prototype.makeFavorite = function() {
this.currentlyPlayingSong.persistFavoriteStatus(true);
};

7
example/src/Song.js Normal file
View File

@@ -0,0 +1,7 @@
function Song() {
}
Song.prototype.persistFavoriteStatus = function(value) {
// something complicated
throw new Error("not yet implemented");
};