(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestWrappedRecordsFind(t *testing.T) { |
| 108 | setupRecords(t, true) |
| 109 | defer teardownRecords(t) |
| 110 | |
| 111 | records, err := storage.LoadRecords(testFolder) |
| 112 | if err != nil { |
| 113 | t.Fatal(err) |
| 114 | } |
| 115 | |
| 116 | wrapped := WrapRecords(records) |
| 117 | for i := 0; i < testRecords; i++ { |
| 118 | id := uint64(i + 1) |
| 119 | if r := wrapped.Find(id); r.IsNull() { |
| 120 | t.Fatalf("wrapped record with id %d not found", id) |
| 121 | } else if r.ID != id { |
| 122 | t.Fatalf("expected record with id %d, found %d", id, r.ID) |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | func TestWrappedRecordsFindWithInvalidId(t *testing.T) { |
| 128 | setupRecords(t, false) |
nothing calls this directly
no test coverage detected