|
|
@ -10,9 +10,7 @@ let tab:Skin[] = [];
|
|
|
|
let tab2:Skin[] = [classique, blue];
|
|
|
|
let tab2:Skin[] = [classique, blue];
|
|
|
|
let dateBirth = new Date(2010,0o3,0o7);
|
|
|
|
let dateBirth = new Date(2010,0o3,0o7);
|
|
|
|
let dateBirth2 = new Date(2009,0o3,0o7);
|
|
|
|
let dateBirth2 = new Date(2009,0o3,0o7);
|
|
|
|
let conv:Conversation[] = [];
|
|
|
|
let usr = new User('00001', 'Killyan', 'password', 'France', 'M', dateBirth, 0, 0, 0, classique, tab);
|
|
|
|
let conv2:Conversation[] = [];
|
|
|
|
|
|
|
|
let usr = new User('00001', 'Killyan', 'password', 'France', 'M', dateBirth, 0, 0, 0, classique, tab, conv);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tests des get
|
|
|
|
// Tests des get
|
|
|
@ -42,7 +40,7 @@ describe('User get tests', () => {
|
|
|
|
expect(usr.getTotalCoins()).toBe(0);
|
|
|
|
expect(usr.getTotalCoins()).toBe(0);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return 0', () => {
|
|
|
|
it('should return 0', () => {
|
|
|
|
expect(usr.getGamePlayed()).toBe(0);
|
|
|
|
expect(usr.getGamesPlayed()).toBe(0);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return classique', () => {
|
|
|
|
it('should return classique', () => {
|
|
|
|
expect(usr.getCurrentSkin()).toBe(classique);
|
|
|
|
expect(usr.getCurrentSkin()).toBe(classique);
|
|
|
@ -50,9 +48,6 @@ describe('User get tests', () => {
|
|
|
|
it('should return tab', () => {
|
|
|
|
it('should return tab', () => {
|
|
|
|
expect(usr.getTabSkin()).toBe(tab);
|
|
|
|
expect(usr.getTabSkin()).toBe(tab);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return conv', () => {
|
|
|
|
|
|
|
|
expect(usr.getTabConv()).toBe(conv);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -64,10 +59,9 @@ usr.setSexe('F');
|
|
|
|
usr.setDateOfBirth(dateBirth2);
|
|
|
|
usr.setDateOfBirth(dateBirth2);
|
|
|
|
usr.setCurrentCoins(2);
|
|
|
|
usr.setCurrentCoins(2);
|
|
|
|
usr.setTotalCoins(2);
|
|
|
|
usr.setTotalCoins(2);
|
|
|
|
usr.setGamePlayed(4);
|
|
|
|
usr.setGamesPlayed(4);
|
|
|
|
usr.setCurrentSkin(blue);
|
|
|
|
usr.setCurrentSkin(blue);
|
|
|
|
usr.setTabSkin(tab2);
|
|
|
|
usr.setTabSkin(tab2);
|
|
|
|
usr.setTabConv(conv2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tests des set
|
|
|
|
// Tests des set
|
|
|
@ -94,7 +88,7 @@ describe('User get tests', () => {
|
|
|
|
expect(usr.getTotalCoins()).toBe(2);
|
|
|
|
expect(usr.getTotalCoins()).toBe(2);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return 4', () => {
|
|
|
|
it('should return 4', () => {
|
|
|
|
expect(usr.getGamePlayed()).toBe(4);
|
|
|
|
expect(usr.getGamesPlayed()).toBe(4);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return kikou', () => {
|
|
|
|
it('should return kikou', () => {
|
|
|
|
expect(usr.getCurrentSkin()).toBe(blue);
|
|
|
|
expect(usr.getCurrentSkin()).toBe(blue);
|
|
|
@ -102,7 +96,4 @@ describe('User get tests', () => {
|
|
|
|
it('should return tab2', () => {
|
|
|
|
it('should return tab2', () => {
|
|
|
|
expect(usr.getTabSkin()).toBe(tab2);
|
|
|
|
expect(usr.getTabSkin()).toBe(tab2);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
it('should return conv2', () => {
|
|
|
|
|
|
|
|
expect(usr.getTabConv()).toBe(conv2);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|