示例#1
0
        public void EvaluateWithNullPluralRulesContext_ShouldThrow_ArgumentNullExpection()
        {
            CultureInfo          culture  = new CultureInfo("nr");
            IPluralRulesResource resource = this.Fixture.Localizer.ResolveResource(culture);
            Exception            ex       = Record.Exception(() => resource.Evaluate(null));

            Assert.IsType <ArgumentNullException>(ex);
        }
        public void Evaluate_ShouldReturn_ExpectedPluralRulesValues(string input, PluralRulesValues expected)
        {
            CultureInfo          culture  = new CultureInfo("es");
            IPluralRulesResource resource = this.Fixture.Localizer.ResolveResource(culture);
            PluralRulesValues    result   = resource.Evaluate(PluralRulesContext.Create(input));

            Assert.Equal(expected, result);
        }