Unit test for Tuple.getRecordId() and Tuple.setRecordId()
()
| 44 | * Unit test for Tuple.getRecordId() and Tuple.setRecordId() |
| 45 | */ |
| 46 | @Test public void modifyRecordId() { |
| 47 | Tuple tup1 = new Tuple(Utility.getTupleDesc(1)); |
| 48 | HeapPageId pid1 = new HeapPageId(0,0); |
| 49 | RecordId rid1 = new RecordId(pid1, 0); |
| 50 | tup1.setRecordId(rid1); |
| 51 | |
| 52 | try { |
| 53 | assertEquals(rid1, tup1.getRecordId()); |
| 54 | } catch (java.lang.UnsupportedOperationException e) { |
| 55 | //rethrow the exception with an explanation |
| 56 | throw new UnsupportedOperationException("modifyRecordId() test failed due to " + |
| 57 | "RecordId.equals() not being implemented. This is not required for Lab 1, " + |
| 58 | "but should pass when you do implement the RecordId class."); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * JUnit suite target |
nothing calls this directly
no test coverage detected