-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnysiis_test.go
52 lines (41 loc) · 1.58 KB
/
nysiis_test.go
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package nysiis_test
import (
"fmt"
"testing"
"github.com/0xnu/nysiis"
)
func TestNysiis_Encode(t *testing.T) {
name1 := "Watkins"
encodedName1 := nysiis.NewNysiis().Encode(name1)
fmt.Printf("Encoded name for %q: %s\n", name1, encodedName1)
name2 := "Robert Johnson"
encodedName2 := nysiis.NewNysiis().Encode(name2)
fmt.Printf("Encoded name for %q: %s\n", name2, encodedName2)
name3 := "Samantha Williams"
encodedName3 := nysiis.NewNysiis().Encode(name3)
fmt.Printf("Encoded name for %q: %s\n", name3, encodedName3)
name4 := "Olanrewaju Akinyele"
encodedName4 := nysiis.NewNysiis().Encode(name4)
fmt.Printf("Encoded name for %q: %s\n", name4, encodedName4)
name5 := "Obinwanne Obiora"
encodedName5 := nysiis.NewNysiis().Encode(name5)
fmt.Printf("Encoded name for %q: %s\n", name5, encodedName5)
name6 := "Abdussalamu Abubakar"
encodedName6 := nysiis.NewNysiis().Encode(name6)
fmt.Printf("Encoded name for %q: %s\n", name6, encodedName6)
name7 := "Virat Kohli"
encodedName7 := nysiis.NewNysiis().Encode(name7)
fmt.Printf("Encoded name for %q: %s\n", name7, encodedName7)
name8 := "Usman Shah"
encodedName8 := nysiis.NewNysiis().Encode(name8)
fmt.Printf("Encoded name for %q: %s\n", name8, encodedName8)
// Output:
// Encoded name for "Watkins": WATCAN
// Encoded name for "Robert Johnson": RABART
// Encoded name for "Samantha Williams": SANANT
// Encoded name for "Olanrewaju Akinyele": OLANRA
// Encoded name for "Obinwanne Obiora": OBAWAN
// Encoded name for "Abdussalamu Abubakar": ABDASA
// Encoded name for "Virat Kohli": VARATC
// Encoded name for "Usman Shah": USNANS
}