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

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