support

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteInstance

func DeleteInstance()

DeleteInstance deletes cached instance of optly wrapper

Types

type ClientWrapper

type ClientWrapper struct {
	// contains filtered or unexported fields
}

ClientWrapper - wrapper around the optimizely client that keeps track of various custom components used with the client

func GetInstance

func GetInstance(apiOptions models.APIOptions) *ClientWrapper

GetInstance returns a cached or new instance of the optly wrapper

func (*ClientWrapper) GetProjectConfig

func (c *ClientWrapper) GetProjectConfig() config.ProjectConfig

GetProjectConfig gets the right config project

func (*ClientWrapper) InvokeAPI

func (c *ClientWrapper) InvokeAPI(request models.APIOptions) (models.APIResponse, error)

InvokeAPI processes request with arguments

type ScenarioCtx

type ScenarioCtx struct {
	// contains filtered or unexported fields
}

ScenarioCtx holds both apiOptions and apiResponse for a scenario.

func (*ScenarioCtx) DispatchedEventsPayloadsInclude

func (c *ScenarioCtx) DispatchedEventsPayloadsInclude(value *gherkin.DocString) error

DispatchedEventsPayloadsInclude checks dispatched events to contain the given events.

func (*ScenarioCtx) InTheResponseKeyShouldBeObject

func (c *ScenarioCtx) InTheResponseKeyShouldBeObject(argumentType, value string) error

InTheResponseKeyShouldBeObject checks that the response object contains a property with given value.

func (*ScenarioCtx) InTheResponseShouldHaveEachOneOfThese

func (c *ScenarioCtx) InTheResponseShouldHaveEachOneOfThese(argumentType string, value *gherkin.DocString) error

InTheResponseShouldHaveEachOneOfThese checks that the response object contains each of the provided properties.

func (*ScenarioCtx) InTheResponseShouldMatch

func (c *ScenarioCtx) InTheResponseShouldMatch(argumentType string, value *gherkin.DocString) error

InTheResponseShouldMatch checks that the response object contains a property with matching value.

func (*ScenarioCtx) IsCalledWithArguments

func (c *ScenarioCtx) IsCalledWithArguments(apiName string, arguments *gherkin.DocString) error

IsCalledWithArguments calls an SDK API with arguments.

func (*ScenarioCtx) ListenerIsAdded

func (c *ScenarioCtx) ListenerIsAdded(numberOfListeners int, ListenerName string) error

ListenerIsAdded defines the listeners to be added to the client.

func (*ScenarioCtx) PayloadsOfDispatchedEventsDontIncludeDecisions

func (c *ScenarioCtx) PayloadsOfDispatchedEventsDontIncludeDecisions() error

PayloadsOfDispatchedEventsDontIncludeDecisions checks dispatched events to contain no decisions.

func (*ScenarioCtx) Reset

func (c *ScenarioCtx) Reset()

Reset clears all data before each scenario, assigns new scenarioID and sets session as false

func (*ScenarioCtx) ResponseShouldHaveThisExactlyNTimes

func (c *ScenarioCtx) ResponseShouldHaveThisExactlyNTimes(argumentType string, count int, value *gherkin.DocString) error

ResponseShouldHaveThisExactlyNTimes checks that the response object has the given property exactly N times.

func (*ScenarioCtx) TheDatafileIs

func (c *ScenarioCtx) TheDatafileIs(datafileName string) error

TheDatafileIs defines a datafileName to initialize the client with.

func (*ScenarioCtx) TheNumberOfDispatchedEventsIs

func (c *ScenarioCtx) TheNumberOfDispatchedEventsIs(count int) error

TheNumberOfDispatchedEventsIs checks the count of the dispatched events to be equal to the given value.

func (*ScenarioCtx) TheResultShouldBeBoolean

func (c *ScenarioCtx) TheResultShouldBeBoolean() error

TheResultShouldBeBoolean checks that the result is equal to the given boolean value.

func (*ScenarioCtx) TheResultShouldBeFloat

func (c *ScenarioCtx) TheResultShouldBeFloat(lv, rv int) error

TheResultShouldBeFloat checks that the result is of type double with the given value.

func (*ScenarioCtx) TheResultShouldBeInteger

func (c *ScenarioCtx) TheResultShouldBeInteger(result int) error

TheResultShouldBeInteger checks that the result is of type integer with the given value.

func (*ScenarioCtx) TheResultShouldBeString

func (c *ScenarioCtx) TheResultShouldBeString(result string) error

TheResultShouldBeString checks that the result is of type string with the given value.

func (*ScenarioCtx) TheResultShouldBeTypedBoolean

func (c *ScenarioCtx) TheResultShouldBeTypedBoolean(result string) error

TheResultShouldBeTypedBoolean checks that the result is of type boolean with the given value.

func (*ScenarioCtx) TheResultShouldMatchList

func (c *ScenarioCtx) TheResultShouldMatchList(list string) error

TheResultShouldMatchList checks that the result equals to the provided list.

func (*ScenarioCtx) TheUserProfileServiceIs

func (c *ScenarioCtx) TheUserProfileServiceIs(upsType string) error

TheUserProfileServiceIs defines UserProfileService type

func (*ScenarioCtx) TheUserProfileServiceStateShouldBe

func (c *ScenarioCtx) TheUserProfileServiceStateShouldBe(value *gherkin.DocString) error

TheUserProfileServiceStateShouldBe checks current state of UPS

func (*ScenarioCtx) ThereAreNoDispatchedEvents

func (c *ScenarioCtx) ThereAreNoDispatchedEvents() error

ThereAreNoDispatchedEvents checks the dispatched events count to be empty.

func (*ScenarioCtx) ThereIsNoUserProfileState

func (c *ScenarioCtx) ThereIsNoUserProfileState() error

ThereIsNoUserProfileState checks that UPS is empty

func (*ScenarioCtx) UserHasMappingInUserProfileService

func (c *ScenarioCtx) UserHasMappingInUserProfileService(userID, experimentKey, variationKey string) error

UserHasMappingInUserProfileService defines UserMapping in UPS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL