public void InitVoucher()
        {
            var project = new Project();
            project.Name = "Test";

            Voucher = new PaymentVoucher();
            Voucher.Project = project;
            Voucher.CheckNumber = "123";
            Voucher.PaidTo = "Kevin";

            var entry = new PaymentVoucherEntry();
            entry.Item = "someting";
            entry.CostElement = "big";
            entry.Amount = 234.23;
            Voucher.Entries.Add(entry);
            entry = new PaymentVoucherEntry();
            entry.Item = "someting else";
            entry.CostElement = "not so big";
            entry.Amount = .01;
            Voucher.Entries.Add(entry);
            entry = new PaymentVoucherEntry();
            entry.Item = "that thing";
            entry.CostElement = "small";
            entry.Amount = 2304990324.3;
            Voucher.Entries.Add(entry);
        }
        public void PaymentVoucherEntry_IsBankEntry_ShouldReturnTrueIfBlank()
        {
            var entry = new PaymentVoucherEntry();
            Assert.IsTrue(entry.IsBlankEntry());

            entry.Item = null;
            entry.CostElement = null;
            Assert.IsTrue(entry.IsBlankEntry());

            entry.Item = "";
            entry.CostElement = "";
            Assert.IsTrue(entry.IsBlankEntry());

            entry.Amount = 0;
            Assert.IsTrue(entry.IsBlankEntry());

            entry.Item = "123";
            entry.CostElement = "123";
            entry.Amount = 123;
            Assert.IsFalse(entry.IsBlankEntry());
        }
 /// <summary>
 /// Add new rows to the list of entries
 /// </summary>
 /// <param name="number"></param>
 public void AddBlankRows(int number)
 {
     for (int i = 0; i < number; i++)
     {
         var entry = new PaymentVoucherEntry();
         entry.PaymentVoucherID = ID;
         this.Entries.Add(entry);
     }
 }
        private PaymentVoucherEntry createTestVoucherEntry(Guid PaymentVoucherID)
        {
            var entry = new PaymentVoucherEntry();
            entry.Amount = 123;
            entry.CostElement = "123";
            entry.Item = "stuff";
            entry.PaymentVoucherID = PaymentVoucherID;

            return entry;
        }