public void EmployerInfos_NewEMployer_Test() { user u = new user(); Employer Employer = new Employer( u ); ; EmployerInfo E = new EmployerInfo( Employer, "clément", 1000, 2000, "inactif", true ); E.NewEmployer(); string result = E.state; Assert.That( result, Is.EqualTo( "actif" ) ); }
public void EmployerInfos_GetEMployer_Test() { user u = new user(); Employer Employer = new Employer( u ); ; EmployerInfo E = new EmployerInfo( Employer, "clément", 1000, 2000, "actif", true ); Tuple<string , int , int , string> result = E.GetEmployer(); Assert.That( result, Is.EqualTo( Tuple.Create( E.name, E.money, E.notoriety, E.state ) ) ); }
public void CheckEmployer_Test( int notoriety, bool expectedResult ) { user u = new user(); Employer Employer = new Employer( u ); ; EmployerInfo E = new EmployerInfo( Employer, "clément", 1000, 2000, "actif", true ); bool result = E.CheckEmployer( notoriety ); Assert.That( result, Is.EqualTo(expectedResult) ); }
public Employer(user u) { this.u = u; EmployerInfo BNP = new EmployerInfo( this, "BNP", 500, 500, "inactif",false ); EmployerInfo LCL = new EmployerInfo( this, "LCL", 1000, 2000, "inactif", false ); EmployerInfo Edouard = new EmployerInfo( this, "Edouard", 2000, 5000, "inactif", false ); EmployerInfo Clement = new EmployerInfo( this, "Clement", 5000, 10000, "inactif", false ); D.Add( "BNP", BNP ); D.Add( "LCL", LCL ); D.Add( "Edouard", Edouard ); D.Add( "Clement", Clement ); employer = "MyFirstJob"; }
public void Constructor_EmployerInfos_Test() { user u = new user(); Employer Employer = new Employer( u ); ; EmployerInfo E = new EmployerInfo( Employer, "clément", 1000, 2000, "actif", true ); string result = E.name; var empl = E.E; int money = E.money; int not = E.notoriety; string state = E.state; bool res = E.achat; Assert.That( result, Is.EqualTo( "clément" ) ); Assert.That( empl, Is.EqualTo( Employer ) ); Assert.That( money, Is.EqualTo( 1000 ) ); Assert.That( not, Is.EqualTo( 2000 ) ); Assert.That( state, Is.EqualTo( "actif" ) ); Assert.That( res, Is.True ); }