github.com/trawler/terraform@v0.10.8-0.20171106022149-4b1c7a1d9b48/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 }