Zbiór zmian 896 dla trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs
- Data:
- 2009-11-24 12:24:57 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs (zmodyfikowane) (2 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/TestMethods.cs
r882 r896 12 12 class TestMethods 13 13 { 14 private string testNip1 = "12345";15 private int testIdFaktury = 1000;16 17 14 private Function _f = new Function(); 18 15 19 [Test]20 [Category("Unit")]21 public void TestFindInvoiceByNumber()22 {23 FakeDataContext fake = new FakeDataContext();24 IRepository<vPlatnosciEcard> _rep = new Repository<vPlatnosciEcard>(fake);25 26 vPlatnosciEcard platnosc = new vPlatnosciEcard();27 platnosc = _rep.FindInvoiceById(1).SingleOrDefault();28 Assert.That(platnosc.Faktura_Numer, Is.EqualTo("1"));29 }30 16 [Test] 31 17 [Category("Unit")] … … 33 19 { 34 20 FakeDataContext fake = new FakeDataContext(); 35 IRepository<vPlatnosciEcard>_rep = new Repository<vPlatnosciEcard>(fake);21 var _rep = new Repository<vPlatnosciEcard>(fake); 36 22 37 vPlatnosciEcard platnosc = _f.create Payment(testIdFaktury, testNip1, "", 0, 0);23 vPlatnosciEcard platnosc = _f.createInvoice(123, "nip", "", 0, 0); 38 24 _rep.Insert(platnosc); 39 25 40 vPlatnosciEcard pl = _rep.FindInvoiceById(testIdFaktury).SingleOrDefault(); 41 Assert.That(pl.nip, Is.EqualTo(testNip1)); 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")); 42 30 } 43 31 }
