Package net.stoerr.chatgpt.codevengine
Class AbstractActionIT
- java.lang.Object
-
- net.stoerr.chatgpt.codevengine.AbstractActionIT
-
- Direct Known Subclasses:
CoDeveloperEngineGeneralIT,ExecuteExternalActionIT,GrepActionIT,ListFilesActionIT,ReadFileActionIT,ReplaceActionIT,ReplaceRegexActionIT,UrlActionIT,WriteFileActionIT
public abstract class AbstractActionIT extends Object
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.ErrorCollectorcollector
-
Constructor Summary
Constructors Constructor Description AbstractActionIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcheckResponse(String path, String method, String requestBody, int expectedStatusCode, String expectFile)Executes a call and does checks on it; if you want to compare the response yourself just set expectFile=null.protected StringreadFile(String filepath)voidsetUp()static voidsetUpClass()voidtearDown()static voidtearDownClass()protected voidwriteActualAndCompareExpected(org.apache.http.HttpResponse response, String expectFilename, String result)
-
-
-
Method Detail
-
setUp
public void setUp() throws InterruptedException- Throws:
InterruptedException
-
tearDown
public void tearDown() throws InterruptedException- Throws:
InterruptedException
-
checkResponse
protected String checkResponse(String path, String method, String requestBody, int expectedStatusCode, String expectFile) throws IOException
Executes a call and does checks on it; if you want to compare the response yourself just set expectFile=null.- Throws:
IOException
-
writeActualAndCompareExpected
protected void writeActualAndCompareExpected(org.apache.http.HttpResponse response, String expectFilename, String result) throws IOException- Throws:
IOException
-
readFile
protected String readFile(String filepath) throws IOException
- Throws:
IOException
-
-