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

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