예제 #1
0
        public void Should_Generate_Alcohol_Between_2_And_10()
        {
            var decimalSeparator = Regex.Escape(CultureInfo.CurrentCulture.NumberFormat.PercentDecimalSeparator);
            var symbol           = Regex.Escape(CultureInfo.CurrentCulture.NumberFormat.PercentSymbol);

            var result = Beer.Alcohol();

            Assert.That(result, Does.Match("^([2-9]" + decimalSeparator + "[0-9]|10" + decimalSeparator + "0)" + symbol + "$"));
        }