コード例 #1
0
        public void Get_EmptyString_ReturnsDefault()
        {
            // Arrange
            var defaultRankingName = "Default";
            // Act
            var ruleSet = RuleSetProvider.GetRuleSet("");

            // Assert
            Assert.AreEqual(defaultRankingName, ruleSet.Name);
        }
コード例 #2
0
        public void Get_KnownRuleSet_ReturnsRanking()
        {
            // Arrange
            var ruleSetName = "Default";
            // Act
            var ruleSet = RuleSetProvider.GetRuleSet(ruleSetName);

            // Assert
            Assert.AreEqual(ruleSetName, ruleSet.Name);
        }
コード例 #3
0
        public void Get_UnknownRuleSet_ReturnsDefault()
        {
            // Arrange
            var unknownRankingName = "this_ruleset_is_unkown";
            var defaultRankingName = "Default";
            // Act
            var ruleSet = RuleSetProvider.GetRuleSet(unknownRankingName);

            // Assert
            Assert.AreEqual(defaultRankingName, ruleSet.Name);
        }
コード例 #4
0
 public Task <RuleSet> GetRuleSet(string ruleSetName)
 {
     return(Task.Run(() => RuleSetProvider.GetRuleSet(ruleSetName)));
 }