public void TestCreateLendingReceipt()
        {
            DateTime start = new DateTime(2017, 11, 30);
            DateTime s**t  = new DateTime(2017, 12, 3);

            Device        device      = new Device("22", "Pelle");
            List <Device> listdevice5 = new List <Device>();

            listdevice5.Add(device);

            lr.CreateLoan(start, s**t, listdevice5);
            Lending loan       = lr.GetLoan();
            string  casenumber = "Søren-1234";

            string loanerinfo = "Søren";

            LendingReceiptRepository.Instance.CreateLendingReceipt(loanerinfo, casenumber, loan, "Pelle");
            Assert.AreEqual(casenumber, LendingReceiptRepository.Instance.lendingReceiptList[0].Casenumber);
        }
        public void CreateLoan()
        {
            DateTime start = new DateTime(2016, 11, 30);
            DateTime s**t  = new DateTime(2016, 12, 3);

            Device        device     = new Device("1", "Pelle");
            List <Device> listdevice = new List <Device>();

            listdevice.Add(device);


            lr.CreateLoan(start, s**t, listdevice);
            Lending testloan = lr.GetLoan();



            Assert.AreEqual(start, testloan.StartDate);
            Assert.AreEqual(s**t, testloan.EndDate);
            Assert.AreEqual("1", testloan.Devices[0].DeviceId);
        }
        public void ReturnAvailableDevicesfortimeperiod()
        {
            LendingReceipt lendingReceipt  = new LendingReceipt();
            Device         devicePelle     = new Device("1", "Pelles-PC");
            List <Device>  PelleDevicelist = new List <Device>();

            DeviceRepository.StaticInstance.DeviceList.Add(devicePelle);
            PelleDevicelist.Add(devicePelle);

            DateTime start = new DateTime(2017, 11, 30);
            DateTime s**t  = new DateTime(2017, 12, 3);

            lendingReceipt.CreateLoan(start, s**t, PelleDevicelist);
            Lending loanSøren = lendingReceipt.GetLoan();

            LendingReceiptRepository.Instance.CreateLendingReceipt("Søren Hansen Sø[email protected]", "Søren-1234", loanSøren, "Pelle");
            Assert.IsFalse(LendingReceiptRepository.Instance.ReturnAvailableDevicesForGivenPeriod(start, s**t).Contains(devicePelle));
        }