github.com/brandonstevens/terraform@v0.9.6-0.20170512224929-5367f2607e16/terraform/ui_output_mock.go (about)

     1  package terraform
     2  
     3  // MockUIOutput is an implementation of UIOutput that can be used for tests.
     4  type MockUIOutput struct {
     5  	OutputCalled  bool
     6  	OutputMessage string
     7  	OutputFn      func(string)
     8  }
     9  
    10  func (o *MockUIOutput) Output(v string) {
    11  	o.OutputCalled = true
    12  	o.OutputMessage = v
    13  	if o.OutputFn != nil {
    14  		o.OutputFn(v)
    15  	}
    16  }