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 )

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