Pokaż
Ignoruj:
Data:
2009-12-23 11:26:06 (16 years ago)
Autor:
marek
Opis:

re #215 - dodanie nowego projektu z lepsza nazwa i typem projektu

Pliki:
1 zmodyfikowane

Legenda:

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

    r969 r970  
    11using System; 
    2 using System.Linq; 
    32using System.Web.Mvc; 
    4  
     3using adMoto.Payments.Core; 
     4using adMoto.Payments.Core.Data; 
     5using adMoto.Payments.Core.Interfaces; 
    56using NUnit.Framework; 
    6 using MvcContrib.TestHelper; 
    77using Platnosci.Controllers; 
    8  
    9 using Platnosci.Core.Interface; 
    10 using Platnosci.Core.Linq; 
    118using Platnosci.Models; 
    129 
     
    141138        { 
    142139            //Arrange 
    143             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
     140            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
    144141            var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 
    145142            repVPayment.Insert(platnosc); 
     
    162159        { 
    163160            //Arrange 
    164             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    165             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 
     161            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     162            var platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 
    166163            repVPayment.Insert(platnosc); 
    167164 
     
    185182            //Arrange 
    186183            //Tworzymy takie dane aby platnosc o danym id byla juz zaplacona  
    187             var repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
     184            var repVPayment = new Repository<Invoice>(new FakeDataContext()); 
    188185            var invoice = _function.CreateInvoice(123, "nip1", "aaa", 0, 0); 
    189186            repVPayment.Insert(invoice); 
     
    212209        { 
    213210            //Arrange 
    214             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    215             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     211            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     212            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    216213            repVPayment.Insert(platnosc); 
    217214 
     
    240237        { 
    241238            //Arrange 
    242             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    243             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     239            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     240            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    244241            repVPayment.Insert(platnosc); 
    245242 
     
    261258        { 
    262259            //Arrange 
    263             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    264             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     260            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     261            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    265262            repVPayment.Insert(platnosc); 
    266263 
     
    282279        { 
    283280            //Arrange 
    284             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    285             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    286             repVPayment.Insert(platnosc); 
    287  
    288             var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
    289             controller.ControllerContext = _function.CreateControllerContext("nip1"); 
    290             string name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 
    291             Payer payer = _function.CreatePayer(123, name, "test"); 
     281            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     282            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     283            repVPayment.Insert(platnosc); 
     284 
     285            var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
     286            controller.ControllerContext = _function.CreateControllerContext("nip1"); 
     287            var name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 
     288            var payer = _function.CreatePayer(123, name, "test"); 
    292289 
    293290            //Act 
     
    303300        { 
    304301            //Arrange 
    305             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    306             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    307             repVPayment.Insert(platnosc); 
    308  
    309             var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
    310             controller.ControllerContext = _function.CreateControllerContext("nip1"); 
    311             string surname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 
    312             Payer payer = _function.CreatePayer(123, "test", surname); 
     302            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     303            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     304            repVPayment.Insert(platnosc); 
     305 
     306            var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
     307            controller.ControllerContext = _function.CreateControllerContext("nip1"); 
     308            var surname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 
     309            var payer = _function.CreatePayer(123, "test", surname); 
    313310 
    314311            //Act 
     
    324321        { 
    325322            //Arrange 
    326             IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    327             vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
     323            IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 
     324            var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 
    328325            repVPayment.Insert(platnosc); 
    329326