/*****************************************************************
 ** @author  TTF T003
 ** @version 0.0.1
 ** @purpose 5.1.2.4, Ensure that the statement block in the ElseCase will be executed if the Object is not an instance of any of the ClassReferences in the select class-statement.
 ** @verdict pass accept
*****************************************************************/
module Sem_5010204_SelectClassStatement_002 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type class MyClass_A {
    //empty class
    }

    type class MyClass_B extends MyClass_A {
    //empty class
    }

    type class MyClass_C extends MyClass_A {
    //empty class
    }

    testcase TC_Sem_5010204_SelectClassStatement_002() runs on GeneralComp {
        var MyClass_A v_a := MyClass_A.create();

        select class (v_a) {
            case (MyClass_B) { setverdict(fail); }
            case (MyClass_C) { setverdict(fail); }
            case else {setverdict(pass);}
        }
    }

    control {
        execute(TC_Sem_5010204_SelectClassStatement_002());
    }
}