package test import ( "testing" "caj-larsson/bog/domain" "caj-larsson/bog/test/mock" ) var file_ref1 = domain.FileReference { "path1", "ua1" } //var file_ref2 = domain.FileReference { "path1", "ua2" } //var file_ref3 = domain.FileReference { "path2", "ua1" } func TestFileService(t *testing.T) { file_repo := mock.NewMockFileRepository() ua_repo := mock.NewMockUserAgentRepository() service := domain.NewBogFileService(ua_repo, file_repo) outfile, err := service.OpenOutFile(file_ref1) if outfile != nil && err != domain.ErrNotExists { t.Errorf("File shall not exist by default") } }