\r\n

51Degrees Pipeline .NET  4.3

51Degrees Pipeline for .NET

FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests Class Reference

Detailed Description

These tests check the various functions of the generated JavaScript include using WebDrivers to simulate a browser environment.

Public Types

enum  ExceptionType {
  PropertyMissingException, PipelineDataException, InvalidCastException, KeyNotFoundException,
  Exception, None
}

Public Member Functions

void  Init ()
Initialise the test. More...
void  JavaScriptBuilderElement_JavaScript (bool minify, string key, string property, object value)
This method tests the accessors functionality of the JavaScript include. More...
void  JavaScriptBuilder_VerifySession ()
Verify that the JavaScript contains the Session ID and Sequence values. More...
void  JavaScriptBuilder_VerifyUrl ()
Check that the callback URL is generated correctly. More...
void  JavaScriptBuilder_VerifyParameters (string userAgent, string lat, string lon)
Verify that parameters are set in the JavaScript payload and if the query parameters are in the evidence More...
void  JavaScriptBuilderElement_Promise (ExceptionType exceptionThrownByPromiseProperty, bool exceptionExpected)
Check that accessing the 'Promise' property works as intended in a range of scenarios More...
void  JavaScriptBuilderElement_DelayExecution (bool minify)
Verify that valid JavaScript is produced when there are delayed execution properties in the payload. More...
void  JavaScriptBuilder_VerifyObjName ()
Check that the JavaScript object name can be overridden successfully. More...
void  Cleanup ()
Cleanup the RemoteWebDriver and http listener. More...

Member Function Documentation

◆ Cleanup()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.Cleanup ( )

Cleanup the RemoteWebDriver and http listener.

◆ Init()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.Init ( )

Initialise the test.

◆ JavaScriptBuilder_VerifyObjName()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilder_VerifyObjName ( )

Check that the JavaScript object name can be overridden successfully.

◆ JavaScriptBuilder_VerifyParameters()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilder_VerifyParameters ( string   userAgent,
string   lat,
string   lon  
)

Verify that parameters are set in the JavaScript payload and if the query parameters are in the evidence

◆ JavaScriptBuilder_VerifySession()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilder_VerifySession ( )

Verify that the JavaScript contains the Session ID and Sequence values.

◆ JavaScriptBuilder_VerifyUrl()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilder_VerifyUrl ( )

Check that the callback URL is generated correctly.

◆ JavaScriptBuilderElement_DelayExecution()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilderElement_DelayExecution ( bool   minify )

Verify that valid JavaScript is produced when there are delayed execution properties in the payload.

◆ JavaScriptBuilderElement_JavaScript()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilderElement_JavaScript ( bool   minify,
string   key,
string   property,
object   value  
)

This method tests the accessors functionality of the JavaScript include.

For the supplied properties values, check that these properties can be accessed via the 'fod' object in the JavaScript include.

Parameters
key -
property -
value -

◆ JavaScriptBuilderElement_Promise()

void FiftyOne.Pipeline.JavaScript.Tests.JavaScriptBuilderElementTests.JavaScriptBuilderElement_Promise ( ExceptionType   exceptionThrownByPromiseProperty,
bool   exceptionExpected  
)

Check that accessing the 'Promise' property works as intended in a range of scenarios