def __init__(self, *, cache_key: bool = True, filename: str = '', parameters: str = '', script: str = '', script_language: ScriptLanguage = ScriptLanguage.GROOVY, name: str = 'JSR223 Assertion', comments: str = '', is_enabled: bool = True ): """ :type source_type: object """ JSR223.__init__(self, cache_key=cache_key, filename=filename, parameters=parameters, script=script, script_language=script_language) BasicAssertion.__init__( self, name=name, comments=comments, is_enabled=is_enabled)
def test_check(self): with pytest.raises(TypeError): JSR223(cache_key="True")
def test_positive(self): JSR223(script_language=ScriptLanguage.JAVA)
def test_check(self): with pytest.raises(TypeError): JSR223(script_language='java')
def test_positive(self): JSR223(parameters="some parameters")
def test_check2(self): with pytest.raises(TypeError): JSR223(parameters=False)
def test_positive(self): JSR223(script="var a=0")
def test_check2(self): with pytest.raises(TypeError): JSR223(script=False)
def test_positive(self): JSR223(filename="./jmeter_api/basics/jsr223_test.groovy")
def test_check2(self): with pytest.raises(OSError): JSR223(filename="notExestingFile")
def test_check(self): with pytest.raises(TypeError): JSR223(filename=1)
def test_positive(self): JSR223(cache_key=True)