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

re #215 - drobny refactoring

Pliki:
1 zmodyfikowane

Legenda:

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

    r930 r931  
    1 using System; 
    2 using System.Collections.Generic; 
    3 using System.Linq; 
    4 using System.Text; 
    5 using NUnit.Framework; 
     1using NUnit.Framework; 
    62using Platnosci.Core.Linq; 
    73using Platnosci.Core.Interface; 
    8 using MvcContrib.TestHelper; 
    94using Platnosci.Controllers; 
    105using Platnosci.Models; 
     
    1611    class MerchantControllerTests 
    1712    { 
    18         private Function _f = new Function(); 
    19         private ITranslateManager _t = new FakeTranslation(); 
     13        private readonly Function _function = new Function(); 
     14        private readonly ITranslateManager _translateManager = new FakeTranslation(); 
    2015 
    2116        [Test] 
     
    2419        { 
    2520            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    26             vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "", 0, 0); 
     21            vPlatnosciEcard platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 
    2722            repVPayment.Insert(platnosc); 
    2823 
    29             Payer payer = _f.CreatePayer(123, "test", "test"); 
     24            Payer payer = _function.CreatePayer(123, "test", "test"); 
    3025 
    31             var controller = new PlatnoscController(repVPayment, null, null, _t); 
    32             controller.ControllerContext = _f.CreateControllerContext("nip2"); 
     26            var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
     27            controller.ControllerContext = _function.CreateControllerContext("nip2"); 
    3328 
    3429            var result = controller.Show(payer, "pl") as ViewResult; 
     
    4338        { 
    4439            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 
    45             vPlatnosciEcard platnosc = _f.CreateInvoice(12, "nip1", "", 0, 0); 
     40            vPlatnosciEcard platnosc = _function.CreateInvoice(12, "nip1", "", 0, 0); 
    4641            repVPayment.Insert(platnosc); 
    4742 
    48             Payer payer = _f.CreatePayer(123, "test", "test"); 
     43            Payer payer = _function.CreatePayer(123, "test", "test"); 
    4944 
    50             var controller = new PlatnoscController(repVPayment, null, null, _t); 
    51             controller.ControllerContext = _f.CreateControllerContext("nip2"); 
     45            var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 
     46            controller.ControllerContext = _function.CreateControllerContext("nip2"); 
    5247 
    5348            var result = controller.Show(payer, "pl") as ViewResult;