root/trunk/eCard/eCardMVC/adMoto.Payments.Test/Utils/TestDataHelperTests.cs @ 984

Wersja 984, 0.7 KB (wprowadzona przez alina, 16 years temu)

re #215 ujednolicenie nazw obiektow, modyfikacje dotyczace testow interfejsowych (dodanie tymczasowych rekowrdow do bazy na czas testowania )

Line 
1using adMoto.Payments.Core;
2using adMoto.Payments.Core.Data;
3using adMoto.Payments.Test.Fakes;
4using NUnit.Framework;
5
6namespace adMoto.Payments.Test.Utils
7{
8    [TestFixture]
9    public class TestDataHelperTests
10    {
11        private readonly TestDataHelper _testDataHelper = new TestDataHelper();
12
13        [Test]
14        [Category("Unit")]
15        public void TestInsertMethodForPayment()
16        {
17            var repVPayment = new Repository<Invoice>(new FakeDataContext());
18
19            var invoice1 = _testDataHelper.CreateInvoice(123, "nip", "", 0, 0);
20            repVPayment.Insert(invoice1);
21
22            var invoice2 = repVPayment.FindOne(123);
23            Assert.That(invoice2.nip, Is.EqualTo("nip"));
24        }
25    }
26}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.