Exemple #1
0
 public EmployerInfo(Employer E, string name, int money, int notoriety, string state, bool achat)
 {
     this.name = name;
     this.money = money;
     this.notoriety = notoriety;
     this.state = state;
     this.E = E;
     this.achat = achat;
 }
Exemple #2
0
        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" ) );
        }
Exemple #3
0
        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 ) ) );
        }
Exemple #4
0
        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) );
        }
Exemple #5
0
 public user()
 {
     rnd = new Random();
     random = new Random();
     Action A = new Action(this);
     News N = new News(this);
     Bonus B = new Bonus( this );
     Argent Ar = new Argent( this );
     Employer E = new Employer( this );
     action = A;
     news = N;
     bonus = B;
     argent = Ar;
     employer = E;
 }
Exemple #6
0
        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 );
        }