(t *testing.T)
| 54 | } |
| 55 | |
| 56 | func TestFileStreamFileNotFound(t *testing.T) { |
| 57 | stream := NewFileStream("unknown-path/my-file.txt") |
| 58 | |
| 59 | _, err := stream.Data() |
| 60 | |
| 61 | if err.Error() != "File 'unknown-path/my-file.txt' not found" { |
| 62 | t.Errorf("Should return file not found error, but got: %v", err) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func createFile(t *testing.T, name string, content string) string { |
| 67 | path := filepath.Join(t.TempDir(), name) |
nothing calls this directly
no test coverage detected