public void Real2() { var charts = new CompetencyAggregator(); charts.UserCompetenceChange(new CompetenceUpdateCommand { UserId = "1", Competencies = new[] { "cert-msad" } }); var result = charts.SearchUsers(new List <string> { "[cert msad]" }); CollectionAssert.AreEquivalent(new[] { "1" }, result); }
public void FindOneCompetency() { var charts = new CompetencyAggregator(); charts.UserCompetenceChange(new CompetenceUpdateCommand { UserId = "1", Competencies = new[] { "comp1", "comp" } }); charts.UserCompetenceChange(new CompetenceUpdateCommand { UserId = "2", Competencies = new[] { "comp1", "comp3" } }); charts.UserCompetenceChange(new CompetenceUpdateCommand { UserId = "3", Competencies = new[] { "comp2", "comp3" } }); var result = charts.SearchUsers(new List <string> { "comp" }); CollectionAssert.AreEquivalent(new[] { "1" }, result); }