Beispiel #1
0
        public void TestMethod1()
        {
            ServicePersonne s = new ServicePersonne();
            Personne        p = new Personne();

            p.Nom = "KATEE";
            p     = s.Ajouter(p);
        }
 public CentreSportifCreateur()
 {
     try
     {
         //Init la connexion
         this.con = new MySqlConnection(connectionString);
         //Init les DAOs
         this.personneDAO = new PersonneDAO(this.con);
         this.activiteDAO = new ActiviteDAO(this.con);
         this.groupeDAO   = new GroupeDAO(this.con);
         //Init les service
         this.servicePersonne = new ServicePersonne(personneDAO);
         this.serviceActivite = new ServiceActivite(activiteDAO);
         this.serviceGroupe   = new ServiceGroupe(groupeDAO);
     }
     catch (Exception e)
     {
         Console.WriteLine("Erreur dans l'initialisation des singleton details : \n" + e.Message);
     }
 }
Beispiel #3
0
        public void ValidationSearchPersoneTest()
        {
            MKSBusiness <Personne, List <Personne>, SearchPersonne> b = new MKSBusiness <Personne, List <Personne>, SearchPersonne>();

            b.SetValidationSearch(new ValidationSearchPersonne());


            Personne        searchpp = new Personne();
            ServicePersonne sp       = new ServicePersonne();
            SearchPersonne  searchp  = new SearchPersonne();

            searchp.Nom = "LOLO";
            try
            {
                b.Select(searchp);
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOfType(ex, typeof(MKS.Core.Model.Error.ExceptionProcess <MKS.Core.ProcessResults>));
            }
        }