public void NullGroupId() { AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); Assert.IsNull(glm.getAssets("groupId")); }
public void BasicCtorTest() { AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); Assert.IsNotNull(glm); }
public void AddAssetTest() { string groupId = "groupId"; AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); glm.addAssets(groupId, new string[] { "asset1" }); Assert.AreEqual(1, glm.getAssets(groupId).Count); }
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); }
public void AddAssetsToExistingEmptyList() { string groupId = "groupId"; AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); glm.addGroupId(groupId); glm.addAssets(groupId, new string [] { "assets" }); Assert.AreEqual("assets", glm.getAssets(groupId)[0]); }
public void AddDuplicateAssetToExistingList() { string groupId = "groupId"; string [] asset = new string [] { "asset1" }; AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); glm.addAssets(groupId, asset); Assert.AreEqual(1, glm.getAssets(groupId).Count); glm.addAssets(groupId, asset); Assert.AreEqual(1, glm.getAssets(groupId).Count); }
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); } } } }
public void AddMultipleAssetsToExistingList() { string groupId = "groupId"; string [] assets = new string [] { "asset1" }; AssetsDataManager alm = new AssetsDataManager(); ProblemDataManager plm = new ProblemDataManager(); GroupLinkageManager glm = new GroupLinkageManager(alm, plm); glm.addAssets(groupId, assets); Assert.AreEqual(1, glm.getAssets(groupId).Count); assets = new string[] { "asset2", "asset3", "asset4" }; glm.addAssets(groupId, assets); foreach (string asset in assets) { Assert.IsTrue(glm.getAssets(groupId).Contains(asset)); } Assert.IsTrue(glm.getAssets(groupId).Contains("asset1")); }