Ejemplo n.º 1
0
        public void TestMethod2()
        {
            //ARRANGE
            var underTest = new CompteManagerImpl_Memory();
            var expected  = new Compte {
                Numero = "C1000", Proprietaire = "Zakaria", Solde = 1000M
            };                                                                             //nombre de compte
            string id = "C1000";
            //ACT
            var actual = underTest.FindById(id);

            //ASSERT
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void TestMethod1()
        {
            //ARRANGE
            var underTest = new CompteManagerImpl_Memory();
            var expected  = 3;//nombre de compte
            //ACT
            var actual = underTest.FindAll();

            foreach (var item in actual)
            {
                Console.WriteLine(item.Proprietaire);
            }
            //ASSERT
            Assert.AreEqual(expected, ((IList <Compte>)actual).Count);
        }
        public void TestFindAll()
        {
            //ARRANGE

            var underTest = new CompteManagerImpl_Memory();
            var Expected  = 3; // NUmber of existing Counts

            //ACT

            var Actual = underTest.FindAll();

            //foreach(var item in Actual)
            //{
            //    Console.WriteLine(item.Proprietaire);
            //}

            //ASSERT

            Assert.AreEqual(Expected, ((IList <Compte>)Actual).Count);
        }
        public void FindByIdTest()
        {
            var underTest = new CompteManagerImpl_Memory();
            var Expected  = new Compte {
                Numero = "C1000", Solde = 1000M, Proprietaire = "Zakareyya"
            };
            var id = "C1000";



            //ACT

            var Actual = underTest.FindById(id);

            //foreach(var item in Actual)
            //{
            //    Console.WriteLine(item.Proprietaire);
            //}

            //ASSERT

            Assert.AreEqual(Expected, Actual);
        }