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

Wersja 896, 0.9 KB (wprowadzona przez alina, 16 years temu)

re #215 zmiana parametrow w konstruktorze PlatnosciController?, dostosowanie testow do zmiany

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