package americanlease

import (
	"testing"

	"github.com/fiskerinc/cloud-services/pkg/validator"
	"github.com/fiskerinc/cloud-services/pkg/vindecoder"
)


func TestCheckForInvalidVINs(t *testing.T){
	invalidVINList := []string{}
	for vin := range VINList {
		if !validator.ValidateVINSimple(vin){
			invalidVINList = append(invalidVINList, vin)
			continue
		}
		if !vindecoder.VerifyVinCheckDigit(vin){
			invalidVINList = append(invalidVINList, vin)
		}
	}
	if len(invalidVINList) > 0 {
		t.Fail()
		t.Logf("%+v\n", invalidVINList)
	}
}
