using adMoto.Payments.Core;
using adMoto.Payments.Core.Data;
using adMoto.Payments.Test.Fakes;
using NUnit.Framework;

namespace adMoto.Payments.Test.Utils
{
    [TestFixture]
    public class TestDataHelperTests 
    {
        private readonly TestDataHelper _testDataHelper = new TestDataHelper();

        [Test]
        [Category("Unit")]
        public void TestInsertMethodForPayment()
        {
            var repVPayment = new Repository<Invoice>(new FakeDataContext());

            var invoice1 = _testDataHelper.CreateInvoice(123, "nip", "", 0, 0);
            repVPayment.Insert(invoice1);

            var invoice2 = repVPayment.FindOne(123);
            Assert.That(invoice2.nip, Is.EqualTo("nip"));
        }
    }
}