Skip to content

Commit 0410fcd

Browse files
committed
add: check not implemented methods
1 parent a3faab7 commit 0410fcd

File tree

8 files changed

+58
-6
lines changed

8 files changed

+58
-6
lines changed

bik/bik_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
"github.com/stretchr/testify/assert"
8+
"github.com/stretchr/testify/require"
89

910
"github.com/sshaplygin/docs-code/models"
1011
)
@@ -107,3 +108,9 @@ func TestValidate(t *testing.T) {
107108
}
108109
})
109110
}
111+
112+
func Test_Generate(t *testing.T) {
113+
require.Panics(t, func() {
114+
Generate()
115+
})
116+
}

ogrn/ogrn_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"testing"
77

88
"github.com/stretchr/testify/assert"
9+
"github.com/stretchr/testify/require"
910

1011
"github.com/sshaplygin/docs-code/models"
1112
)
@@ -96,3 +97,9 @@ func TestValidate(t *testing.T) {
9697
}
9798
})
9899
}
100+
101+
func Test_Generate(t *testing.T) {
102+
require.Panics(t, func() {
103+
Generate()
104+
})
105+
}

ogrnip/ogrnip_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
"github.com/stretchr/testify/assert"
8+
"github.com/stretchr/testify/require"
89

910
"github.com/sshaplygin/docs-code/models"
1011
)
@@ -101,3 +102,9 @@ func TestValidate(t *testing.T) {
101102
}
102103
})
103104
}
105+
106+
func Test_Generate(t *testing.T) {
107+
require.Panics(t, func() {
108+
Generate()
109+
})
110+
}

okato/okato.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package okato
22

33
// Validate check to valid OKATO format
44
// example: input format is 17205000000
5-
func Validate() (bool, error) {
5+
func Validate(okato string) (bool, error) {
66
panic("not implemented!")
77
}
88

okato/okato_test.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
package okato
22

3-
import "testing"
3+
import (
4+
"testing"
45

5-
func TestValidate(t *testing.T) {
6+
"github.com/stretchr/testify/require"
7+
)
68

9+
func Test_Validete(t *testing.T) {
10+
require.Panics(t, func() {
11+
Validate("")
12+
})
13+
}
14+
15+
func Test_Generate(t *testing.T) {
16+
require.Panics(t, func() {
17+
Generate()
18+
})
719
}

oktmo/oktmo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package oktmo
22

33
// Validate check to valid OKTMO format
44
// example: input format is 17605101
5-
func Validate() (bool, error) {
5+
func Validate(oktmo string) (bool, error) {
66
panic("not implemented!")
77
}
88

oktmo/oktmo_test.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
package oktmo
22

3-
import "testing"
3+
import (
4+
"testing"
45

5-
func TestValidate(t *testing.T) {
6+
"github.com/stretchr/testify/require"
7+
)
68

9+
func Test_Validete(t *testing.T) {
10+
require.Panics(t, func() {
11+
Validate("")
12+
})
13+
}
14+
15+
func Test_Generate(t *testing.T) {
16+
require.Panics(t, func() {
17+
Generate()
18+
})
719
}

snils/snils_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
"github.com/stretchr/testify/assert"
8+
"github.com/stretchr/testify/require"
89

910
"github.com/sshaplygin/docs-code/models"
1011
)
@@ -106,3 +107,9 @@ func TestValidate(t *testing.T) {
106107
}
107108
})
108109
}
110+
111+
func Test_Generate(t *testing.T) {
112+
require.Panics(t, func() {
113+
Generate()
114+
})
115+
}

0 commit comments

Comments
 (0)