github.com/skyscape-cloud-services/terraform@v0.9.2-0.20170609144644-7ece028a1747/terraform/ui_input_prefix_test.go (about) 1 package terraform 2 3 import ( 4 "testing" 5 ) 6 7 func TestPrefixUIInput_impl(t *testing.T) { 8 var _ UIInput = new(PrefixUIInput) 9 } 10 11 func testPrefixUIInput(t *testing.T) { 12 input := new(MockUIInput) 13 prefix := &PrefixUIInput{ 14 IdPrefix: "foo", 15 UIInput: input, 16 } 17 18 _, err := prefix.Input(&InputOpts{Id: "bar"}) 19 if err != nil { 20 t.Fatalf("err: %s", err) 21 } 22 23 if input.InputOpts.Id != "foo.bar" { 24 t.Fatalf("bad: %#v", input.InputOpts) 25 } 26 }