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

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

re #215 - dodanie nowego projektu z lepsza nazwa i typem projektu

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