JetBrains-Research / TestSpark

TestSpark - a plugin for generating unit tests. TestSpark natively integrates different AI-based test generation tools and techniques in the IDE. Started by SERG TU Delft. Currently under implementation by JetBrains Research (ICTL) for research purposes.
MIT License
35 stars 9 forks source link

`JUnitTestsAssembler` violates Single Responsibility Principle #269

Closed Vladislav0Art closed 1 week ago

Vladislav0Art commented 1 week ago

See this comment on another PR.

The JUnitTestsAssembler class is aware of the HTTP protocol and the exact format of the OpenAI platform's response, but its main purpose is to consume the textual test suite and update the indicator UI.

The method JUnitTestsAssembler.consume(httpRequest: HttpRequests.Request) must be moved into OpenAIRequestManager; the JUnitTestsAssembler must contain only consume(String) method coming from the base class.

This refactoring will make OpenAIRequestManager usable for any other implementor of the TestsAssembler interface.