Skip to content

Commit

Permalink
add resolver tests back
Browse files Browse the repository at this point in the history
  • Loading branch information
chermehdi committed Feb 18, 2020
1 parent caaa96e commit 5f5d2be
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions templates/resolver_test.go
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
package templates

// func TestResolveTemplateByLanguageJava(t *testing.T) {
// temp, err := ResolveTemplateByLanguage("java")
// assert.NoError(t, err)
// assert.Equal(t, JavaTemplate, temp)
// }
//
// func TestResolveTemplateByLanguagePython(t *testing.T) {
// temp, err := ResolveTemplateByLanguage("python")
// assert.NoError(t, err)
// assert.Equal(t, PythonTemplate, temp)
// }
//
// func TestResolveTemplateByLanguageCpp(t *testing.T) {
// temp, err := ResolveTemplateByLanguage("cpp")
// assert.NoError(t, err)
// assert.Equal(t, CppTemplate, temp)
// }
//
// func TestResolveTemplateByLanguageUnknow(t *testing.T) {
// temp, err := ResolveTemplateByLanguage("dummy")
// assert.Error(t, err)
// assert.Empty(t, temp)
// }
import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestResolveTemplateByLanguageJava(t *testing.T) {
temp, err := ResolveTemplateByLanguage("java")
assert.NoError(t, err)
assert.Equal(t, JavaTemplate, temp)
}

func TestResolveTemplateByLanguagePython(t *testing.T) {
temp, err := ResolveTemplateByLanguage("python")
assert.NoError(t, err)
assert.Equal(t, PythonTemplate, temp)
}

func TestResolveTemplateByLanguageCpp(t *testing.T) {
temp, err := ResolveTemplateByLanguage("cpp")
assert.NoError(t, err)
assert.Equal(t, CppTemplate, temp)
}

func TestResolveTemplateByLanguageUnknow(t *testing.T) {
temp, err := ResolveTemplateByLanguage("dummy")
assert.Error(t, err)
assert.Empty(t, temp)
}

0 comments on commit 5f5d2be

Please sign in to comment.