This file contains hidden or 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
from behave import given, when, then | |
import requests | |
@given(u'The manager asks for the "{mandatory}" skill Java with the id "{id}" and the level "{level:d}"') | |
def step_impl(context, mandatory, id, level): | |
context.payload = dict() | |
context.payload['asked_skills'] = [] | |
context.payload['asked_languages'] = [] | |
context.payload['among_skills'] = [] | |
context.payload['among_languages'] = [] |
This file contains hidden or 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
Feature: Skills matching | |
In order to have some matching pourcentage on the platform. | |
As a manager, I am able to look for some skills among others skills. | |
Scenario: A manager is looking for some skilled people. | |
Given The manager asks for the "non-mandatory" skill Java with the id "6774ab13-9c9c-4db5-a897-d69ac1676411" and the level "5" | |
And The manager asks for the "non-mandatory" skill Project Management with the id "4d734d03-a46c-4608-a6de-bc65ea48427a" and the level "3" | |
And The manager asks for the language French with the id "1b52d40d-f437-4c15-848e-ad17a67d3a4b" of level "5" | |
And The manager asks for the language English with the id "802f5ca1-311e-4806-b1a6-c5b368ea3b9c" of level "5" | |
When The skill Java Enterprise with id "5a8d863c-fd51-4835-a093-4127faa73628" of level "5" is provided |
This file contains hidden or 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
Feature: Skills exposure | |
In order to get all the skills of the platform | |
As the API client | |
I want to get all the skills | |
Scenario: All skills | |
Given the client API is asking for all the skills | |
Then the response should be on object with the skills using their key as uuid | |
And the status code must be 200 | |
And the content type must be application/json |
This file contains hidden or 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
import json | |
import behave | |
import requests | |
from behave import given, then | |
@given(u'the client API is asking for all the skills') | |
def step_impl(context): | |
context.res: requests.Response = requests.get(context.url + '/v2/skills', headers=context.headers) | |
context.elements = json.loads(context.res.text) |
This file contains hidden or 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
class User { | |
constructor( | |
private idCardNumber: string, // a unique id which aimes to make entity distinctable | |
private lastname: string, | |
private firstname: string, | |
private birthdate: Date, | |
private profile: Profile, // // a value object protected by the aggregate root | |
private email: Email // a shared value object protected by the aggregate root | |
) { } |
This file contains hidden or 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
class Line { | |
constructor(private description: string, private amount: number, private vat: number) { } | |
} | |
class Bill { | |
private lines: Line[] = []; | |
getLines(): Line[] { | |
return this.lines; | |
} |
This file contains hidden or 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
/** | |
* Entity | |
*/ | |
class Line { | |
constructor(private description: string, private amount: number, private vat: number) { } | |
public isEmpty(): boolean { | |
return this.description === '' && this.amount === 0 && this.vat === 0; | |
} | |
} |
This file contains hidden or 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
<?php | |
namespace App\Services; | |
use App\Entity\Team; | |
use App\Repository\TeamRepository; | |
class TeamService | |
{ | |
const TEAM_CATEGORIES = [ |
This file contains hidden or 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
enum ALLOWED_CURRENCIES { | |
'EUR' = '€', | |
'USD' = '$' | |
}; | |
class Currency { | |
private _value: string; | |
constructor(value: string) { |
This file contains hidden or 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
class User { | |
private _name: string; | |
constructor() {} | |
set name(name: string) { | |
this._name = name; | |
} | |
get name(): string { |