Pokaż
Ignoruj:
Data:
2009-12-07 11:39:40 (16 years ago)
Autor:
marek
Opis:

re #215 - drobny refactoring

Lokalizacja:
trunk/eCard/eCardMVC/Platnosci.Tests
Pliki:
2 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/Platnosci.Tests

    • Włąściwość: svn:ignore set to
      bin
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs

    r927 r930  
    3434        {           
    3535           var repository = new Repository<PlatnosciEcard>(new FakeDataContext()); 
    36            var platnosci = _f.createNewPayment(orderNumber, false, DateTime.Now, 12345);  
     36           var platnosci = _f.CreateNewPayment(orderNumber, false, DateTime.Now, 12345);  
    3737           repository.Insert(platnosci); 
    3838           repository.SubmitChanges(); 
     
    6464        { 
    6565            var repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 
    66             var platnosci = _f.createNewPayment(orderNumber, false, DateTime.Now, 12345); 
     66            var platnosci = _f.CreateNewPayment(orderNumber, false, DateTime.Now, 12345); 
    6767            repPayment.Insert(platnosci); 
    6868            repPayment.SubmitChanges(); 
     
    9393        { 
    9494            IRepository<PlatnosciEcard> repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 
    95             PlatnosciEcard platnosc = _f.createNewPayment(orderNumber, false, data, 1); 
     95            PlatnosciEcard platnosc = _f.CreateNewPayment(orderNumber, false, data, 1); 
    9696            repPayment.Insert(platnosc); 
    9797 
     
    110110            IRepository<PlatnosciEcard> repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 
    111111 
    112             PlatnosciEcard platnosc = _f.createNewPayment(orderNumber, false, data, 1); 
     112            PlatnosciEcard platnosc = _f.CreateNewPayment(orderNumber, false, data, 1); 
    113113            repPayment.Insert(platnosc); 
    114114 
     
    126126        { 
    127127            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    128             vPlatnosciEcard platnosc = _f.createInvoice(123, "nip1", "", 0, 0); 
    129             repVPayment.Insert(platnosc); 
    130  
    131             var controller = new PlatnoscController(repVPayment, null, null, _t); 
    132             controller.ControllerContext = _f.createControllerContext("nip2"); 
     128            vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "", 0, 0); 
     129            repVPayment.Insert(platnosc); 
     130 
     131            var controller = new PlatnoscController(repVPayment, null, null, _t); 
     132            controller.ControllerContext = _f.CreateControllerContext("nip2"); 
    133133            
    134134            var result = controller.Show("123","pl") as ViewResult; 
     
    143143        { 
    144144            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    145             vPlatnosciEcard platnosc = _f.createInvoice(123, "", "", 0, 0); 
     145            vPlatnosciEcard platnosc = _f.CreateInvoice(123, "", "", 0, 0); 
    146146            repVPayment.Insert(platnosc); 
    147147 
     
    161161            //Tworzymy takie dane aby platnosc o danym id byla juz zaplacona  
    162162            var repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    163             var invoice = _f.createInvoice(123, "nip1", "aaa", 0, 0); 
     163            var invoice = _f.CreateInvoice(123, "nip1", "aaa", 0, 0); 
    164164            repVPayment.Insert(invoice); 
    165165            repVPayment.SubmitChanges(); 
    166166 
    167167            var repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 
    168             var confirm = _f.createConfirm(code_Ok, 123456); 
     168            var confirm = _f.CreateConfirm(code_Ok, 123456); 
    169169            repConfirm.Insert(confirm); 
    170170            repConfirm.SubmitChanges(); 
    171171 
    172172            var controller = new PlatnoscController(repVPayment, null, repConfirm, _t); 
    173             controller.ControllerContext = _f.createControllerContext("nip1"); 
     173            controller.ControllerContext = _f.CreateControllerContext("nip1"); 
    174174            //controller.setZaplacono("Platnosc zostala uregulowana"); 
    175175 
     
    185185        { 
    186186            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    187             vPlatnosciEcard platnosc = _f.createInvoice(123, "nip1", "numer", 200, 0); 
     187            vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 
    188188            repVPayment.Insert(platnosc); 
    189189 
    190190            var repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 
    191             var confirm = _f.createConfirm(code_Ok, 1); 
     191            var confirm = _f.CreateConfirm(code_Ok, 1); 
    192192            repConfirm.Insert(confirm); 
    193193            repConfirm.SubmitChanges(); 
    194194 
    195195            var controller = new PlatnoscController(repVPayment, null, repConfirm, _t); 
    196             controller.ControllerContext = _f.createControllerContext("nip1"); 
     196            controller.ControllerContext = _f.CreateControllerContext("nip1"); 
    197197 
    198198            var result = controller.Show("123", "pl") as ViewResult; 
     
    209209        { 
    210210            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    211             vPlatnosciEcard platnosc = _f.createInvoice(123, "nip1", "numer", 200, 0); 
    212             repVPayment.Insert(platnosc); 
    213  
    214             var controller = new PlatnoscController(repVPayment, null, null, _t); 
    215             controller.ControllerContext = _f.createControllerContext("nip1"); 
     211            vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 
     212            repVPayment.Insert(platnosc); 
     213 
     214            var controller = new PlatnoscController(repVPayment, null, null, _t); 
     215            controller.ControllerContext = _f.CreateControllerContext("nip1"); 
    216216             
    217             Payer payer = _f.createPayer(123, "", "test");  //Brak imienia 
     217            Payer payer = _f.CreatePayer(123, "", "test");  //Brak imienia 
    218218            controller.Show(payer, "pl"); 
    219219            Assert.That(controller.ModelState.IsValid, Is.False); 
     
    224224        { 
    225225            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    226             vPlatnosciEcard platnosc = _f.createInvoice(123, "nip1", "numer", 200, 0); 
    227             repVPayment.Insert(platnosc); 
    228  
    229             var controller = new PlatnoscController(repVPayment, null, null, _t); 
    230             controller.ControllerContext = _f.createControllerContext("nip1"); 
    231  
    232             Payer payer = _f.createPayer(123, "test", "test");   
     226            vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 
     227            repVPayment.Insert(platnosc); 
     228 
     229            var controller = new PlatnoscController(repVPayment, null, null, _t); 
     230            controller.ControllerContext = _f.CreateControllerContext("nip1"); 
     231 
     232            Payer payer = _f.CreatePayer(123, "test", "test");   
    233233            var result = controller.Show(payer, "pl") as ViewResult; 
    234234