Example #1
0
        public void Operator_ShouldThrowException_WhenInputInvalidOperator()
        {
            Captcha captcha = new Captcha(1, 1, 4, 1);

            Assert.Throws(typeof(InvalidFormatOperatorException),
                          delegate { captcha.GetOperator(); });
        }
Example #2
0
        public void Operator_ShouldBePlus_WhenInputIs1()
        {
            Captcha captcha = new Captcha(1, 1, 1, 1);

            Assert.AreEqual("+", captcha.GetOperator());
        }
Example #3
0
        public void Operator_ShouldBeMultiply_WhenInputIs2()
        {
            Captcha captcha = new Captcha(1, 1, 2, 1);

            Assert.AreEqual("*", captcha.GetOperator());
        }
Example #4
0
        public void Operator_ShouldBeMinus_WhenInputIs3()
        {
            Captcha captcha = new Captcha(1, 1, 3, 1);

            Assert.AreEqual("-", captcha.GetOperator());
        }