22 lines
712 B
Go
22 lines
712 B
Go
package model
|
|
|
|
import "testing"
|
|
|
|
func TestCompTagSuggestionTermsKeepFullAndLocalPaths(t *testing.T) {
|
|
parentPath := "grid000.zone000.station000"
|
|
compNSPath := "110kV_TV-demoProject"
|
|
compTag := "cable_22-testProject1110kV_TV"
|
|
|
|
fullTerm, localTerm := compTagSuggestionTerms(parentPath, compNSPath, compTag)
|
|
|
|
wantFullTerm := "grid000.zone000.station000.110kV_TV-demoProject.cable_22-testProject1110kV_TV"
|
|
if fullTerm != wantFullTerm {
|
|
t.Fatalf("expected full suggestion term %q, got %q", wantFullTerm, fullTerm)
|
|
}
|
|
|
|
wantLocalTerm := "110kV_TV-demoProject.cable_22-testProject1110kV_TV"
|
|
if localTerm != wantLocalTerm {
|
|
t.Fatalf("expected local suggestion term %q, got %q", wantLocalTerm, localTerm)
|
|
}
|
|
}
|