(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestNoPrimitiveCleanup(t *testing.T) { |
| 48 | fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{}) |
| 49 | if err != nil { |
| 50 | t.Fatal(err) |
| 51 | } |
| 52 | defer fac.Close(t.Context()) |
| 53 | |
| 54 | ins, err := fac.Instantiate(t.Context()) |
| 55 | if err != nil { |
| 56 | t.Fatal(err) |
| 57 | } |
| 58 | defer ins.Close(t.Context()) |
| 59 | |
| 60 | actual := ins.Primitive(t.Context()) |
| 61 | |
| 62 | const expected = true |
| 63 | if actual != expected { |
| 64 | t.Errorf("expected: %t, but got: %t", expected, actual) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestNoOptionalPrimitiveCleanup(t *testing.T) { |
| 69 | fac, err := NewBasicFactory(t.Context(), SlogLogger{}, Utils{}) |
nothing calls this directly
no outgoing calls
no test coverage detected