Beispiel #1
0
 public MatchWS(int pId, JediWS pJedi1, JediWS pJedi2, JediWS pJediV, StadeWS pStade, EPhaseTournoi pPhase)
 {
     this.Id = pId;
     this.Jedi1 = pJedi1;
     this.Jedi2 = pJedi2;
     this.JediVainqueur = pJediV;
     this.Stade = pStade;
     this.Phase = (EPhaseTournoiWS)pPhase;
 }
        public void TestServiceARJedis()
        {
            ServiceReference.ServiceClient client = new ServiceReference.ServiceClient();

            List<JediWS> jedis = client.getJedis();
            int size = jedis.Count;
            Assert.IsNotNull(jedis);
            /* AJOUT */
            JediWS bob = new JediWS(0, "Bob THE TEST", true, new List<CaracteristiqueWS>());
            client.addJedi(bob);
            Assert.AreEqual(size+1, client.getJedis().Count);
            /* SUPPRESSION */
            bob = client.getJedis().Find(x => x.Nom.Equals("Bob THE TEST"));
            client.removeJedi(bob);
            Assert.AreEqual(size, client.getJedis().Count);

            client.Close();
        }