-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from spira/feature/navigation-structure
Feature/navigation structure
- Loading branch information
Showing
11 changed files
with
110 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
///<reference path="../../../build/js/declarations.d.ts" /> | ||
|
||
(() => { | ||
|
||
let seededChance = new Chance(1); | ||
|
||
describe('User Model', () => { | ||
|
||
it('should return the user\'s full name', () => { | ||
|
||
let userData:global.IUserData = { | ||
userId:seededChance.guid(), | ||
email:seededChance.email(), | ||
firstName:seededChance.first(), | ||
lastName:seededChance.last(), | ||
}; | ||
|
||
let user = new common.models.User(userData); | ||
|
||
expect(user.fullName()).to.equal(userData.firstName + ' '+userData.lastName); | ||
|
||
|
||
}); | ||
|
||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module common.models { | ||
|
||
export class User implements global.IUserData{ | ||
|
||
public userId:string; | ||
public email:string; | ||
public firstName:string; | ||
public lastName:string; | ||
public _userCredential:global.IUserCredential; | ||
|
||
constructor(data:global.IUserData) { | ||
|
||
_.assign(this, data); | ||
|
||
} | ||
|
||
public fullName() { | ||
return this.firstName + ' ' + this.lastName; | ||
} | ||
|
||
} | ||
// | ||
//angular.module(namespace, []) | ||
// .service('userService', UserService); | ||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters