You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HackBrowserData/internal/outputter/outputter_test.go

22 lines
417 B

package outputter
import (
"os"
"testing"
)
func TestNewOutPutter(t *testing.T) {
out := NewOutPutter("json")
if out == nil {
t.Error("NewOutPutter() returned nil")
}
f, err := out.CreateFile("results", "test.json")
if err != nil {
t.Error("CreateFile() returned an error", err)
}
defer os.RemoveAll("results")
err = out.Write(nil, f)
if err != nil {
t.Error("Write() returned an error", err)
}
}