Feature - Rejected ResponseMakingUtilities

fredg1

Member
I'm currently in the process of trying to find uses for RequestTestBase (https://github.com/kolmafia/kolmafia/pull/175) (while waiting for progress on the language server side).

One thing that I'm realizing is that it was probably a bad idea to simply have *respondIf* take a mere String as the first parameter; we'll want to submit well formed replicas of what KoL submits, and it'd be a pain to have to re-form everything every time...

So, I'm thinking of making a library that would help with creating these mock KoL responses.

It would be an exhaustive tree of classes. What I have currently:

(abstract) FakeKoLResponse
--- FakeApiResponse (maybe?)
--- FakeCharPaneResponse
--- (abstract) FakeMainPaneResponse
------ (abstract) FakeActionResponse (final name TBD. This is the two situations that have the "action bar" at the top)
--------- FakeChoiceResponse
--------- FakeFightResponse
------ FakeInventoryResponse

1- how does the concept sound?
2- Any important category of response I'm forgetting?
 

fronobulax

Developer
Staff member
while waiting for progress on the language server side

I assume you are the person who is not making any progress? There are two PRs that are waiting for a response from you. I would much prefer you finished the Language Server work ;-)
 

fredg1

Member
I assume you are the person who is not making any progress? There are two PRs that are waiting for a response from you.
The changes requested on #49 were actually the request to split it into multiple PRs, which has since been done (would be appreciated if that request for change could be removed, btw)
That PR is actually waiting for review.
 

fronobulax

Developer
Staff member
I'll close #49. #38 remains waiting for changes. The more recent ones weren't tagged with language-server and I haven't looked at them yet.
 

MCroft

Developer
Staff member
I'll close #49. #38 remains waiting for changes. The more recent ones weren't tagged with language-server and I haven't looked at them yet.
I've been hitting them with the label when I see them. It's a useful feature, and I'd love to see more use of labels.
 

fronobulax

Developer
Staff member
I'll consider using labels.

Confusion on my part and #49 is not a candidate to be closed after all.
 

fredg1

Member
Please, I'm currently just waiting for a reply from gausie.
(#38 is currently just on hold)

There's always going to be times where I'm waiting for review that I'll need to fill *somehow*...
 

fronobulax

Developer
Staff member
Your comment in https://github.com/kolmafia/kolmafia/pull/332 clarified something for me. A framework that make it easier to build test code is worth exploring. A framework that builds code that builds data to be used in testing is less helpful. At some point the use case and complexity of the framework is going to mean that the framework will have to be the subject of tests itself.

Maybe explaining how I misunderstand you is how we continue the conversation?
 
Top