예제 #1
0
        public void VerificaGrafic()
        {
            //test: verifica datele pt grafic
            // arrange
            var repo = new ConturiRepository();
            GraficSoldService grafic = new GraficSoldService();
            var client1 = ConturiFactory.Instance.CreazaClient(new PlainText("Ion"), new PlainText("Timisoara"));
            var client2 = ConturiFactory.Instance.CreazaClient(new PlainText("Vasile"), new PlainText("Arad"));
            var cont1   = ConturiFactory.Instance.CreazaCont(new IBAN("RO12RBND1234567890123456"), client1);
            var cont2   = ConturiFactory.Instance.CreazaCont(new IBAN("RO12RBND1234567890123455"), client2);

            repo.AdaugaCont(cont1);
            repo.AdaugaCont(cont2);

            cont1.DepuneBani(new Suma(99.0)); //depune 99 ca sa aiba de unde sa trasnfere
            repo.updateConturi = cont1.TransferBani(new Suma(10.0), cont2.IBAN, repo.getConturi);
            repo.updateConturi = cont1.PlatesteFactura(new Suma(20.0), cont2.IBAN, repo.getConturi);
            grafic.GraficSoldInTimp(cont1);

            //vreau doar sa vad graficul
        }
예제 #2
0
        static void Main(string[] args)
        {
            ConturiRepository       repo   = new ConturiRepository();
            GraficSoldService       grafic = new GraficSoldService();
            RaportTranzactiiService raport = new RaportTranzactiiService();
            Client client1 = ConturiFactory.Instance.CreazaClient(new PlainText("Ion"), new PlainText("Timisoara"));
            Client client2 = ConturiFactory.Instance.CreazaClient(new PlainText("Vasile"), new PlainText("Arad"));
            Cont   cont1   = ConturiFactory.Instance.CreazaCont(new IBAN("RO12RBND1234567890123456"), client1);
            Cont   cont2   = ConturiFactory.Instance.CreazaCont(new IBAN("RO12RBND1234567890123455"), client2);

            repo.AdaugaCont(cont1);
            repo.AdaugaCont(cont2);

            cont1.DepuneBani(new Suma(99.0)); //depune 99 ca sa aiba de unde sa trasnfere
            repo.updateConturi = cont1.TransferBani(new Suma(10.0), cont2.IBAN, repo.getConturi);
            repo.updateConturi = cont1.PlatesteFactura(new Suma(20.0), cont2.IBAN, repo.getConturi);

            grafic.GraficSoldInTimp(cont1);
            raport.RapoarteTranzactii(cont1);
            raport.RapoarteTranzactii(cont2);
            Console.ReadLine();
        }