2020-09-05 15:20:56 +00:00
|
|
|
package dorkgen
|
|
|
|
|
|
|
|
import (
|
|
|
|
assertion "github.com/stretchr/testify/assert"
|
2020-09-05 18:56:14 +00:00
|
|
|
"github.com/sundowndev/dorkgen/duckduckgo"
|
2020-09-05 15:20:56 +00:00
|
|
|
"github.com/sundowndev/dorkgen/googlesearch"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestInit(t *testing.T) {
|
|
|
|
assert := assertion.New(t)
|
|
|
|
|
|
|
|
t.Run("should create a GoogleSearch instance", func(t *testing.T) {
|
|
|
|
dork := NewGoogleSearch()
|
|
|
|
|
|
|
|
assert.IsType(&googlesearch.GoogleSearch{}, dork, "they should be equal")
|
|
|
|
})
|
2020-09-05 18:56:14 +00:00
|
|
|
|
|
|
|
t.Run("should create a DuckDuckGo instance", func(t *testing.T) {
|
|
|
|
dork := NewDuckDuckGo()
|
|
|
|
|
|
|
|
assert.IsType(&duckduckgo.DuckDuckGo{}, dork, "they should be equal")
|
|
|
|
})
|
2020-09-05 15:20:56 +00:00
|
|
|
}
|