java - Good Junit testing for create a JTable? -
i'm new @ junit testing , trying create tests creating jtable. wonder if can guide me through basic tests create jtable?
much appreciated :)
i'm not sure you'd test creation of table rather data you're populating with. (not unless you're creating number of tables @ run-time)
for example, have 2 rows of data want put table.
// given jtable table = new jtable() //populate data etc. //when int rowcount = table.getrows() etc. //then assertequals(2, rowcount);
keep in mind you're testing. careful not go off on tangents , start testing things don't need be/not meant tested.
Comments
Post a Comment