-
-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathcurrency_test.go
More file actions
38 lines (32 loc) · 813 Bytes
/
currency_test.go
File metadata and controls
38 lines (32 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package faker
import (
"testing"
)
func TestCurrency(t *testing.T) {
c := New().Currency()
currency := c.Currency()
NotExpect(t, "", currency)
ExpectInString(t, currency, currencies)
}
func TestCurrencyCode(t *testing.T) {
c := New().Currency()
code := c.Code()
ExpectInString(t, code, currenciesCodes)
}
func TestCurrencyNumber(t *testing.T) {
c := New().Currency()
ExpectInInt(t, c.Number(), currenciesNumbers)
}
func TestCurrencyCountry(t *testing.T) {
c := New().Currency()
country := c.Country()
NotExpect(t, "", country)
ExpectInString(t, country, currenciesCountries)
}
func TestCurrencyAndCode(t *testing.T) {
c := New().Currency()
currency, code := c.CurrencyAndCode()
NotExpect(t, "", currency)
ExpectInString(t, currency, currencies)
ExpectInString(t, code, currenciesCodes)
}