Last active
July 5, 2019 09:17
-
-
Save blanchonvincent/545ff12a587e719e281ebc4c5f5ca78c to your computer and use it in GitHub Desktop.
medium - test package - black box test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package deck_test | |
import ( | |
"github.com/blanchonvincent/test-package/card" | |
"github.com/stretchr/testify/assert" | |
"testing" | |
) | |
func TestDeckCanDrawCards(t *testing.T) { | |
var num uint8 = 10 | |
d := deck.NewDeck(num) | |
for i := uint8(0); i < num; i++ { | |
_, err := d.Draw() | |
assert.Nil(t, err) | |
} | |
_, err := d.Draw() | |
assert.Equal(t, err, deck.Empty) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment