| Line | |
|---|
| 1 | using NUnit.Framework;
|
|---|
| 2 | using Platnosci.Core.Linq;
|
|---|
| 3 |
|
|---|
| 4 | namespace Platnosci.Tests.Web
|
|---|
| 5 | {
|
|---|
| 6 | [TestFixture]
|
|---|
| 7 | public 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 | }
|
|---|
| 28 | }
|
|---|
Notatka: Zobacz
TracBrowser
aby uzyskać więcej informacji.