root/trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs @ 930

Wersja 930, 0.9 KB (wprowadzona przez marek, 16 years temu)

re #215 - drobny refactoring

RevLine 
[930]1using NUnit.Framework;
[882]2using Platnosci.Core.Linq;
3
4namespace Platnosci.Tests.Web
5{
6    [TestFixture]
7    class TestMethods
8    {
[930]9        private readonly Function _function = new Function();
[882]10
11        [Test]
12        [Category("Unit")]
13        public void TestInsertMethodForPayment()
14        {
[930]15            var fake = new FakeDataContext();
16            var vPlatnosciEcardRepository = new Repository<vPlatnosciEcard>(fake);
[882]17
[930]18            var platnosc = _function.CreateInvoice(123, "nip", "", 0, 0);
19            vPlatnosciEcardRepository.Insert(platnosc);
[882]20
[930]21            System.Diagnostics.Debug.WriteLine("rep.Count: " + vPlatnosciEcardRepository.Count());           
22            var pl = vPlatnosciEcardRepository.FindOne(123);
[896]23            System.Diagnostics.Debug.WriteLine("Wartosc nip ma byc 'nip'. Jest " + pl.nip);
24            Assert.That(pl.nip, Is.EqualTo("nip"));
[882]25        }
26    }
27}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.