I wanted to play around with the analyzer algorithm and maybe write some tests to see how it works, but I found it very hard (=impossible for me) to run it in isolation.
I could replace the World-Object with a RegistryKey<World>-Object, which was easier to create in a Test, but ran into other issues then, that indicated I somehow need to initialize forge, which is outside of my comfort zone right now, as I'm a bit rusty in Minecraft programming.
I think it would be a little easier if the JGraphTBasedCompoundAnalyzer was instantiated with instances of ILockedCompoundInformationRegistry, etc. instead of requesting them on demand.
That would also save a lot of getInstance-Calls.
I think having junit tests makes it a lot easier and robust to develop an algorithm like this, as you can just keep coming up with new test setups and confirm the old tests still work as expected.
I wanted to play around with the analyzer algorithm and maybe write some tests to see how it works, but I found it very hard (=impossible for me) to run it in isolation.
I could replace the
World
-Object with aRegistryKey<World>
-Object, which was easier to create in a Test, but ran into other issues then, that indicated I somehow need to initialize forge, which is outside of my comfort zone right now, as I'm a bit rusty in Minecraft programming.I think it would be a little easier if the
JGraphTBasedCompoundAnalyzer
was instantiated with instances ofILockedCompoundInformationRegistry
, etc. instead of requesting them on demand. That would also save a lot ofgetInstance
-Calls.I think having junit tests makes it a lot easier and robust to develop an algorithm like this, as you can just keep coming up with new test setups and confirm the old tests still work as expected.