Пример #1
0
        public void TestServiceARStades()
        {
            ServiceReference.ServiceClient client = new ServiceReference.ServiceClient();

            List <StadeWS> stades = client.getStades();
            int            size   = stades.Count;

            Assert.IsNotNull(stades);
            /* AJOUT */
            StadeWS zone = new StadeWS(0, "Zone TEST", 11, new List <CaracteristiqueWS>());

            client.addStade(zone);
            Assert.AreEqual(size + 1, client.getStades().Count);
            /* SUPPRESSION */
            zone = client.getStades().Find(x => x.Planete.Equals("Zone TEST"));
            client.removeStade(zone);
            Assert.AreEqual(size, client.getStades().Count);

            client.Close();
        }