summaryrefslogtreecommitdiff
path: root/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go
blob: 7852bc4237fc35c32e67c2fb6eaa2099eb7efb63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package terraform

// MockUIOutput is an implementation of UIOutput that can be used for tests.
type MockUIOutput struct {
	OutputCalled  bool
	OutputMessage string
	OutputFn      func(string)
}

func (o *MockUIOutput) Output(v string) {
	o.OutputCalled = true
	o.OutputMessage = v
	if o.OutputFn != nil {
		o.OutputFn(v)
	}
}