Example.tdltx 1.8 KB
Newer Older
Package Wizardry {
    Type integer
    Type string
    Type Integer
    Type String
    
    Collection iCol of integer
//    Collection nCol of iCol
    
    Message Gate http accepts string, integer, String, Integer
    Component node {
        gate http interface
        gate http interface2
        gate http interface3
    } 
    
    Configuration base {  
        node sut as SUT,
//        node sut as Tester,
        node tester as Tester,
        connect sut::interface to tester::interface,
        connect sut::interface2 to tester::interface,
        connect sut::interface to tester::interface3
    }
    Test example uses base {
        tester::interface sends "hello"{string} to sut::interface
        tester::interface sends 1 {Integer} to sut::interface
        tester::interface sends 1 to sut::interface //TODO: unspecified type not resolved -> standard library Integer required
        //better error messages?
//        tester::interface3 receives 2 from sut::interface2
        
        
    }
    
	Annotation Initial conditions
	Annotation Expected behaviour
	Annotation Final conditions
	Annotation Test Purpose Description
	Annotation when
	Annotation then
       
    Objective name {
    	Description: "example"
    	References: "reference"
    }

	Test Purpose Description exampl {
		Objective: name
		Configuration: base
		Expected behaviour
		ensure that {
			when {
				tester::interface sends "hello" to sut::interface
			}	
			then {
				tester::interface receives "hello back" from sut::interface
			}				
		} 		
	}		 

	Test Purpose Description exampl2 {
		Objective: name
		Configuration: base
		Expected behaviour
		ensure that {
			when {
				tester::interface sends "hello" to sut::interface
			}	
			then {
				tester::interface receives "hello back" from sut::interface
			}				
		} 		
	}		
	
    
}