src/test/java/my/company/tests/ArithmeticTestCase.java
@Title("Operation test")
    @Features("Arithmetic operations support")
    @Stories({"Support for arithmetic operations"})
    @Test
    public void performTest() throws Exception{
        Double result = Double.NaN;
        try {
            switch(operation){
                case "+":{
                    result = operand1 + operand2;
                    break;
                }
                case "-":{
                    result = operand1 - operand2;
                    break;
                }
                case "/":{
                    result = operand1 / operand2;
                    break;
                }
                case "*":{
                    result = operand1 * operand2;
                    break;
                }
                default:{
                    fail("Unknown operation");
                }
            }
            Assert.assertEquals(this.result, result, ArithmeticTestCase.EPSILON);
        }
        catch (Throwable e){
            ArithmeticTestCase.saveTxtAttachment();
            throw e;
        }
    }
/**
     * Performs test. Saves text attachment if something goes wrong.
     * Gets result by evaluating expression by js engine.
     * @throws Exception
     */
Performs test. Saves text attachment if something goes wrong.
Gets result by evaluating expression by js engine.
@throws Exception
Performs test . Saves text attachment if something goes wrong . Gets result by evaluating expression by js engine . @throws Exception
@Title("Operation test")
    @Features("Arithmetic operations support")
    @Stories({"Support for arithmetic operations"})
    @Test
    public void performTest() throws Exception{
        Double result = Double.NaN;
        try {
            switch(operation){
                case "+":{
                    result = operand1 + operand2;
                    break;
                }
                case "-":{
                    result = operand1 - operand2;
                    break;
                }
                case "/":{
                    result = operand1 / operand2;
                    break;
                }
                case "*":{
                    result = operand1 * operand2;
                    break;
                }
                default:{
                    fail("Unknown operation");
                }
            }
            Assert.assertEquals(this.result, result, ArithmeticTestCase.EPSILON);
        }
        catch (Throwable e){
            ArithmeticTestCase.saveTxtAttachment();
            throw e;
        }
    }
@ Title ( "Operation test" ) @ Features ( "Arithmetic operations support" ) @ Stories ( { "Support for arithmetic operations" } ) @ Test public void performTest ( ) throws Exception { Double result = Double . NaN ; try { switch ( operation ) { case "+" : { result = operand1 + operand2 ; break ; } case "-" : { result = operand1 - operand2 ; break ; } case "/" : { result = operand1 / operand2 ; break ; } case "*" : { result = operand1 * operand2 ; break ; } default : { fail ( "Unknown operation" ) ; } } Assert . assertEquals ( this . result , result , ArithmeticTestCase . EPSILON ) ; } catch ( Throwable e ) { ArithmeticTestCase . saveTxtAttachment ( ) ; throw e ; } }
Performs test.
Performs test .