github.com/sap/cf-mta-plugin@v2.6.3+incompatible/clients/restclient/fakes/fake_rest_client_builder.go (about)

     1  package fakes
     2  
     3  import (
     4  	"github.com/cloudfoundry-incubator/multiapps-cli-plugin/clients/models"
     5  )
     6  
     7  type mtaResult struct {
     8  	*models.Mta
     9  	error
    10  }
    11  
    12  // FakeRestClientBuilder is a builder of FakeRestClientOperations instances
    13  type FakeRestClientBuilder struct {
    14  	fakeRestClient FakeRestClientOperations
    15  	mtaResults     map[string]mtaResult
    16  }
    17  
    18  // NewFakeRestClientBuilder creates a new builder
    19  func NewFakeRestClientBuilder() *FakeRestClientBuilder {
    20  	return &FakeRestClientBuilder{}
    21  }
    22  
    23  // Build builds a FakeRestClientOperations instance
    24  func (b *FakeRestClientBuilder) Build() *FakeRestClientOperations {
    25  	return &b.fakeRestClient
    26  }