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

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

            //Assert
            Assert.AreEqual(true, op.Etat);
        }
Exemple #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);
        }
Exemple #4
0
        public void testCalculerSansParamReturn2()
        {
            //Arrange
            Addition op = new Addition(5, 2);
            //Act

            Boolean res = op.Calculer();

            //Assert
            Assert.IsTrue(res);
        }
Exemple #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);
        }
Exemple #6
0
        public void testCalculerSansParamReturn()
        {
            //Arrange
            Addition op = new Addition();
            //Act

            Boolean res = op.Calculer();

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

            //Act

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

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

            //Act

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

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