package iot_card

import "testing"

// TestIsRiskGatewayExtend 验证网关扩展状态的风险判断逻辑
func TestIsRiskGatewayExtend(t *testing.T) {
	cases := []struct {
		extend string
		want   bool
	}{
		{"风险停机", true},
		{"已销户", true},
		{"机卡分离停机", false},
		{"待激活", false},
		{"", false},
		{" 风险停机 ", true}, // 含空白字符
		{"已注销", false},   // 非目标状态
	}

	for _, tc := range cases {
		got := isRiskGatewayExtend(tc.extend)
		if got != tc.want {
			t.Errorf("isRiskGatewayExtend(%q) = %v, 期望 %v", tc.extend, got, tc.want)
		}
	}
}
