コード例 #1
0
        public void testCalculerParamReturn()
        {
            //Arrange
            Addition op = new Addition();
            //Act
            Boolean res = op.Calculer(12, 3);

            //Assert
            Assert.IsTrue(res);
        }
コード例 #2
0
        public void testCalculerParamEtat()
        {
            //Arrange
            Addition op = new Addition();
            //Act
            Boolean res = op.Calculer(3, 2);

            //Assert
            Assert.AreEqual(true, op.Etat);
        }
コード例 #3
0
        public void testCalculerParamAtrributs()
        {
            //Arrange
            Addition op = new Addition(12, 5);
            //Act
            Boolean res = op.Calculer(3, 2);

            //Assert
            Assert.AreEqual(3, op.Op1);
            Assert.AreEqual(2, op.Op2);
        }
コード例 #4
0
        public void testCalculerSansParamReturn2()
        {
            //Arrange
            Addition op = new Addition(5, 2);
            //Act

            Boolean res = op.Calculer();

            //Assert
            Assert.IsTrue(res);
        }
コード例 #5
0
        public void testCalculerParamResultat2()
        {
            //Arrange
            Addition op = new Addition(5, 4);

            //Act
            op.Calculer(12, 3);
            Single res = op.Resultat;

            //Assert
            Assert.AreEqual(15, res);
        }
コード例 #6
0
        public void testCalculerSansParamReturn()
        {
            //Arrange
            Addition op = new Addition();
            //Act

            Boolean res = op.Calculer();

            //Assert
            Assert.IsTrue(res);
            Assert.AreEqual(0, op.Resultat);
        }
コード例 #7
0
        public void testCalculerSansParamEtat()
        {
            //Arrange
            Addition op = new Addition(5, 2);

            //Act

            op.Calculer();
            Boolean res = op.Etat;

            //Assert
            Assert.AreEqual(true, res);
        }
コード例 #8
0
        public void testCalculerSansParamResultat()
        {
            //Arrange
            Addition op = new Addition(5, 2);

            //Act

            op.Calculer();
            Single res = op.Resultat;

            //Assert
            Assert.AreEqual(7, res);
        }