示例#1
0
        public void BasicTest()
        {
            AssetsDataManager     alm = new AssetsDataManager();
            ProblemLinkageManager plm = new ProblemLinkageManager(alm);

            Assert.IsNotNull(plm);
        }
示例#2
0
        public void AddLinkage()
        {
            AssetsDataManager     alm = new AssetsDataManager();
            ProblemLinkageManager plm = new ProblemLinkageManager(alm);

            plm.AddProblemLinkage("id", new string [] { "asset1" });
            Assert.AreEqual("asset1", plm.GetAssets("id")[0]);
        }
示例#3
0
        public void BasicTest()
        {
            AssetsDataManager                adm  = new AssetsDataManager();
            ProblemDataManager               pdm  = new ProblemDataManager();
            SkillsDataManager                sdm  = new SkillsDataManager();
            GroupLinkageManager              glm  = new GroupLinkageManager(adm, pdm);
            ProblemLinkageManager            plm  = new ProblemLinkageManager(adm);
            DefaultAssetRecommendationEngine dare = new DefaultAssetRecommendationEngine(adm, sdm, glm, plm);

            Assert.IsNotNull(dare);
        }
示例#4
0
        public void AddMultipleProblemLinks()
        {
            AssetsDataManager     alm = new AssetsDataManager();
            ProblemLinkageManager plm = new ProblemLinkageManager(alm);

            plm.AddProblemLinkage("id1", "asset1");
            plm.AddProblemLinkage("id2", new string [] { "asset2", "asset3" });

            Assert.AreEqual("asset1", plm.GetAssets("id1")[0]);
            Assert.AreEqual("asset2", plm.GetAssets("id2")[0]);
            Assert.AreEqual("asset3", plm.GetAssets("id2")[1]);
        }
示例#5
0
        private void createAssetsSkills(int skillCount, int assetTypesCount, int assetCount, out AssetsDataManager adm, out SkillsDataManager sdm)
        {
            adm = new AssetsDataManager();
            pdm = new ProblemDataManager();
            sdm = new SkillsDataManager();
            glm = new GroupLinkageManager(adm, pdm);
            plm = new ProblemLinkageManager(adm);

            for (int skillId = 0; skillId < skillCount; skillId++)
            {
                sdm.AddSkill(skillIdPrefix + skillId.ToString(), false);
                for (int assetTypeId = 0; assetTypeId < assetTypesCount; assetTypeId++)
                {
                    for (int assetId = 0; assetId < assetCount; assetId++)
                    {
                        adm.AddAsset(skillIdPrefix + skillId, assetTypePrefix + assetTypeId, assetIdPrefix + assetId, 0, 0, 0);
                    }
                }
            }
        }