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/TestMethods.cs

    r896 r930  
    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; 
    7 using Platnosci.Core.Interface; 
    83 
    94namespace Platnosci.Tests.Web 
     
    127    class TestMethods 
    138    { 
    14         private Function _f = new Function(); 
     9        private readonly Function _function = new Function(); 
    1510 
    1611        [Test] 
     
    1813        public void TestInsertMethodForPayment() 
    1914        { 
    20             FakeDataContext fake = new FakeDataContext(); 
    21             var _rep = new Repository<vPlatnosciEcard>(fake); 
     15            var fake = new FakeDataContext(); 
     16            var vPlatnosciEcardRepository = new Repository<vPlatnosciEcard>(fake); 
    2217 
    23             vPlatnosciEcard platnosc = _f.createInvoice(123, "nip", "", 0, 0); 
    24             _rep.Insert(platnosc); 
     18            var platnosc = _function.CreateInvoice(123, "nip", "", 0, 0); 
     19            vPlatnosciEcardRepository.Insert(platnosc); 
    2520 
    26             System.Diagnostics.Debug.WriteLine("rep.Count: " + _rep.Count());             
    27             vPlatnosciEcard pl = _rep.FindOne(123); 
     21            System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count());             
     22            var pl = vPlatnosciEcardRepository.FindOne(123); 
    2823            System.Diagnostics.Debug.WriteLine("Wartosc nip ma byc 'nip'. Jest " + pl.nip); 
    2924            Assert.That(pl.nip, Is.EqualTo("nip"));