Example #1
0
        public void Repo_TestScans()
        {
            IServiceLayer serviceLayer = new ServiceLayer("Listeners.s3db", repoLayer);

            serviceLayer.EnsureScanTableExists();

            Assert.AreEqual(0, repoLayer.GetScanRecords(connection).Count);

            Scan temp = new Scan();

            temp.Wallet   = 10;
            temp.scanType = ScanTypes.OUT;

            repoLayer.InsertScan(connection, temp);

            Assert.AreEqual(1, repoLayer.GetScanRecords(connection).Count);

            Assert.AreEqual(10, repoLayer.GetScanRecords(connection)[0].Wallet);
            Assert.AreEqual(ScanTypes.OUT, repoLayer.GetScanRecords(connection)[0].scanType);

            repoLayer.DeleteScans(connection, 10);

            Assert.AreEqual(0, repoLayer.GetScanRecords(connection).Count);
        }