Class TableauApiSimulator
Object that can simulate API responses like Tableau Server/Cloud. Used in 'simulation' integration tests so real SDK components can be tested together without full Tableau Server/Cloud infrastructure. Unless overridden all responses are successful and well-formed.
Inheritance
Namespace: Tableau.Migration.Api.Simulation
Assembly: Tableau.Migration.dll
Syntax
public sealed class TableauApiSimulator
Constructors
TableauApiSimulator(Uri, IHttpContentSerializer, bool, UserType?, string)
Creates a new TableauApiSimulator object.
Declaration
public TableauApiSimulator(Uri serverUrl, IHttpContentSerializer serializer, bool isTableauServer, UsersResponse.UserType? defaultSignedInUser = null, string defaultDomain = "local")
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | serverUrl | The base server URL. |
| IHttpContentSerializer | serializer | A serializer to use to produce responses. |
| bool | isTableauServer | Indicates whether the current Tableau Data is for Tableau Server (true) or Tableau Cloud (false). |
| UsersResponse.UserType | defaultSignedInUser | Default signed in user to user. If none is provided, the simulated server will have no users. |
| string | defaultDomain | The default domain of the site. |
Properties
Data
Gets the data store for the API.
Declaration
public TableauData Data { get; }
Property Value
| Type | Description |
|---|---|
| TableauData |
ResponseSimulator
Gets the simulator for mocking server responses.
Declaration
public TableauApiResponseSimulator ResponseSimulator { get; }
Property Value
| Type | Description |
|---|---|
| TableauApiResponseSimulator |
RestApi
Gets the simulator for REST API requests.
Declaration
public RestApiSimulator RestApi { get; }
Property Value
| Type | Description |
|---|---|
| RestApiSimulator |
ServerUrl
Gets the URL for the simulated Tableau Server.
Declaration
public Uri ServerUrl { get; }
Property Value
| Type | Description |
|---|---|
| Uri |