Exemplo n.º 1
0
        public void ModulusFractionalNumber_ReturnsFractionalNumber()
        {
            Modulo task = new Modulo();
            task.BuildEngine = new MockBuild();
            task.Numbers = new string[] { "12", "3.5" };
            task.Execute();

            Assert.AreEqual("1.5", task.Result);
        }
Exemplo n.º 2
0
        public void MultipleNumbers_EvaluatesLeftToRight()
        {
            Modulo task = new Modulo();
            task.BuildEngine = new MockBuild();
            task.Numbers = new string[] { "27", "10", "3" };
            task.Execute();

            Assert.AreEqual("1", task.Result);
        }
Exemplo n.º 3
0
        public void DivisionWithRemainder_ReturnsRemainder()
        {
            Modulo task = new Modulo();
            task.BuildEngine = new MockBuild();
            task.Numbers = new string[] { "14", "4" };
            task.Execute();

            Assert.AreEqual("2", task.Result);
        }