コード例 #1
0
        public void setNewDataPackageAnddeleteDataPackageTest()
        {
            RemoteDataStoreService target = new RemoteDataStoreService();
            Guid          pReqID          = new Guid();
            DataContainer pNDPkg          = new DataContainer();

            pNDPkg.Columns = new List <string>();
            pNDPkg.Rows    = new List <string>();
            pNDPkg.Columns.Add("DataPackageType");
            pNDPkg.Columns.Add("DataPackageVersion");
            pNDPkg.Columns.Add("DataPackagePath");

            string lVersion = "11.12.13.14";

            pNDPkg.Rows.Add("PISBASE");
            pNDPkg.Rows.Add(lVersion);
            pNDPkg.Rows.Add(@"\PISBASE\PISBase-11.12.13.14.zip");

            Assert.IsFalse(target.checkIfDataPackageExists("PISBASE", lVersion));

            target.setNewDataPackage(pNDPkg);
            Assert.IsTrue(target.checkIfDataPackageExists("PISBASE", lVersion));

            target.deleteDataPackage(pReqID, "PISBASE", "11.12.13.14");
            Assert.IsFalse(target.checkIfDataPackageExists("PISBASE", lVersion));
        }
コード例 #2
0
        public void checkIfDataPackageExistsTest()
        {
            RemoteDataStoreService target = new RemoteDataStoreService();
            string pDPType    = "PISBASE";
            string pDPVersion = "1.0.0.0";
            bool   expected   = true;
            bool   actual;

            actual = target.checkIfDataPackageExists(pDPType, pDPVersion);
            Assert.AreEqual(expected, actual);
            pDPVersion = "24.23.22.21";
            expected   = false;
            actual     = target.checkIfDataPackageExists(pDPType, pDPVersion);
            Assert.AreEqual(expected, actual);
        }