Hey,
I concur with James on avoiding using SMWQueryResult in your tests directly.
This class has many issues, most notably that it pretends to be some kind
of Value Object, while actually not containing the data, but rather
depending on services bound to persistence and framework to retrieve the
data.
I ran into this issue in 2013 and wrote some mails about it [0] and then
some rudimentary alternative [1] that might now serve as inspiration.
Generally speaking it should be possible to just give your result printer a
value object with the data it should display, and then assert that it
returns the correct stuff, in a functional manner, without any services
being involved, be them persistence services or otherwise.
[0] wikimedia.7.x6.nabble.com/Query-result-rewrite-td5015574.html
[1]
https://github.com/JeroenDeDauw/CheckedTable/tree/master/src/SMW/Query/Result
Cheers
--
Jeroen De Dauw | https://entropywins.wtf | https://keybase.io/jeroendedauw
Software craftsmanship advocate | Developer at Wikimedia Germany
~=[,,_,,]:3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel