configNativeFactoryProviderGeneratorDefaults | ||||||||
configNativeFactoryProviderGeneratorDefaults(config: NativeFactoryGeneratorConfig)
|
||||||||
Applies default values for undefined values in the config object.
Parameters:
Returns:
Required<NativeFactoryGeneratorConfig>
The filled config. |
createNativeFactory | ||||||||
createNativeFactory(produceNative: NativeFactory)
|
||||||||
Creates the factory that will be used in the provider created by
Parameters:
|
createNativeFactoryProvider | |||||||||||||||
createNativeFactoryProvider(produceNative: NativeFactory, config: NativeFactoryGeneratorConfig)
|
|||||||||||||||
Creates a factory provider for the a natve object injection token. The factory runs the specified function and passes the specified dependencies to it. The function will be run outside Angular. By default, the generator will create the factory provider for the Note: The factory will detect non-browser platforms and return
Parameters:
Returns:
FactoryProvider
A |
configNativeProviderGeneratorTestDefaults | ||||||||
configNativeProviderGeneratorTestDefaults(config: NativeProviderGeneratorTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
This also overrides the default value defined for
Parameters:
A full config object with default values for properties that were not specified. |
setupNativeFactoryProviderGeneratorTest | |||||||||||||||
setupNativeFactoryProviderGeneratorTest(createNativeFactoryProvider: FactoryProviderGenerator, config: NativeProviderGeneratorTestConfig)
|
|||||||||||||||
Prepares the testing environment for a factory provider generator test. This will
Parameters:
|
configNativeProviderTestDefaults | ||||||||
configNativeProviderTestDefaults(config: NativeProviderTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
Parameters:
Returns:
Required<NativeProviderTestConfig>
A full config object with default values for properties that were not specified. |
setupNativeFactoryProviderTest | |||||||||||||||
setupNativeFactoryProviderTest(provider: FactoryProvider, config: NativeProviderTestConfig)
|
|||||||||||||||
Prepares the testing environment for a native factory provider test. This will:
Parameters:
|
configProviderGeneratorTestDefaults | ||||||||
configProviderGeneratorTestDefaults(config: ProviderGeneratorTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
Parameters:
A full config object with default values for properties that were not specified. |
setupFactoryProviderGeneratorTest | |||||||||||||||
setupFactoryProviderGeneratorTest(createProvider: FactoryProviderGenerator, config: ProviderGeneratorTestConfig)
|
|||||||||||||||
Prepares the testing environment for a factory provider generator test. This will:
Parameters:
|
configTestDefaults | ||||||||
configTestDefaults(config: ProviderTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
Parameters:
Returns:
Required<ProviderTestConfig>
A full config object with default values for properties that were not specified. |
setupFactoryProviderTest | |||||||||||||||
setupFactoryProviderTest(testedProvider: FactoryProvider, config: ProviderTestConfig)
|
|||||||||||||||
Prepares the testing environment for a factory provider test. This will:
Parameters:
|
configureGoogleMapsTestingModule | ||||||||
configureGoogleMapsTestingModule(options?: IGoogleMapsTestingModuleConfigOptions)
|
||||||||
Configures a basic testing module with common definitions for Google Maps components and extracts useful tools and services. This should allow faster setup without the redundancy of declarations and extractions of services. After calling this function, the caller can simply deconstruct the tools and use them.
Parameters:
Example :
|
createGoogleMapsTestModuleMetadata |
createGoogleMapsTestModuleMetadata()
|
Creates a
Returns:
TestModuleMetadata
A TestBed-ready module configuration. |
fakeTheRunXsideAngularMethod | ||||||||||||
fakeTheRunXsideAngularMethod(api: GoogleMapsApiService, methodName)
|
||||||||||||
Creates a jest spy on the
Parameters:
Returns:
jest.SpyInstance
A jest spy which can be used to count calls to |
configureGoogleMapsTestingModule | ||||||||
configureGoogleMapsTestingModule(options?: IGoogleMapsTestingModuleConfigOptions)
|
||||||||
Configures a basic testing module with common definitions for Google Maps components and extracts useful tools and services. This should allow faster setup without the redundancy of declarations and extractions of services. After calling this function, the caller can simply deconstruct the tools and use them.
Parameters:
Example :
|
createGoogleMapsTestModuleMetadata | ||||||||
createGoogleMapsTestModuleMetadata(config?: GoogleMapsConfig)
|
||||||||
Creates a
Parameters:
Returns:
TestModuleMetadata
A TestBed-ready module configuration. |
configWrapperFactoryProviderGeneratorDefaults | ||||||||
configWrapperFactoryProviderGeneratorDefaults(config: WrapperFactoryGeneratorConfig)
|
||||||||
Applies default values for undefined values in the config object.
Parameters:
Returns:
Required<WrapperFactoryGeneratorConfig>
The filled config. |
createWrapperFactory | ||||||||
createWrapperFactory(produceWrapper: WrapperFactory)
|
||||||||
Creates the factory that will be used in the provider created by
Parameters:
|
createWrapperFactoryProvider | |||||||||||||||
createWrapperFactoryProvider(produceWrapper: WrapperFactory, config: WrapperFactoryGeneratorConfig)
|
|||||||||||||||
Creates a factory provider for the a natve object injection token.
The factory runs the specified function and passes the By default, the generator will create the factory provider for the Note: The factory will detect non-browser platforms and return
Parameters:
Returns:
FactoryProvider
A |
configWrapperProviderGeneratorTestDefaults | ||||||||
configWrapperProviderGeneratorTestDefaults(config: WrapperProviderGeneratorTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
This also overrides the default value defined for
Parameters:
A full config object with default values for properties that were not specified. |
setupWrapperFactoryProviderGeneratorTest | |||||||||||||||
setupWrapperFactoryProviderGeneratorTest(createWrapperFactoryProvider: FactoryProviderGenerator, config: WrapperProviderGeneratorTestConfig)
|
|||||||||||||||
Prepares the testing environment for a factory provider generator test. This will
Parameters:
|
configWrapperProviderTestDefaults | ||||||||
configWrapperProviderTestDefaults(config: WrapperProviderTestConfig)
|
||||||||
Applies default values for unspecified properties of the config object.
Parameters:
Returns:
Required<WrapperProviderTestConfig>
A full config object with default values for properties that were not specified. |
setupWrapperFactoryProviderTest | |||||||||||||||
setupWrapperFactoryProviderTest(provider: FactoryProvider, config: WrapperProviderTestConfig)
|
|||||||||||||||
Prepares the testing environment for a wrapper factory provider test. This will:
Parameters:
|
createLifecycleTestingHostComponentTemplate | |||||||||||||||
createLifecycleTestingHostComponentTemplate(testedComponentTemplate: string, mapDirectives: string)
|
|||||||||||||||
Wraps the template of a tested component with a map element template.
Parameters:
Returns:
string
A string containing the component template wrapped inside a map tempalte. |
createNativeProxy | ||||||||
createNativeProxy(wrapper: TWrapper)
|
||||||||
Creates a proxy object trapping calls to the native object held by the wrapper.
Calls are delegated according to delegation rules and definitions. See
Parameters:
|
delegateNativeFunction | ||||||||||||||||||||
delegateNativeFunction(wrapper: Wrapper, functionName: string, wrappingDef: WrapperFunctionDefinition, wrapperName: string)
|
||||||||||||||||||||
Determines how the native function should be executed and returns a function that implements it accordingly. If a wrapping definition is provided for the function, it will be wrapped accordingly. Otherwise:
Note: This is defined here and not as a private method of the extending class to avoid exposing it to the object's user.
Parameters:
Returns:
Function
A function that will execute the native function by its wrapping definition or by the defined default behaviour. |
delegateOutside | ||||||||||||
delegateOutside(exec: Function, wrapper: Wrapper)
|
||||||||||||
Wraps the specified function in a function that will execute it outside angular.
Parameters:
Returns:
Function
A wrapping function that will execute the specified function outside angular. |
delegateWrapperMethod | ||||||||||||||||
delegateWrapperMethod(wrapper: Wrapper, methodName: string, outside: boolean)
|
||||||||||||||||
Determines how the wrapper method should be executed and returns a function that implements it accordingly. If the method should be executed outside angular, it will be wrapped and returned. Otherwise, the method itself will be returned. Note: This is defined here and not as a private method of the extending class to avoid exposing it to the object's user.
Parameters:
Returns:
Function
A function that will execute the wrapper method by its wrapping definition. |
extractWrapperMetadata | ||||||||
extractWrapperMetadata(wrapper: Wrapper)
|
||||||||
Extracts decorators metadata from a wrapper object.
Parameters:
Returns:
WrapperMetadata
The metadata defined for that type of wrapper. |
isGetter | ||||||||
isGetter(property: string)
|
||||||||
Checks whether the given property name matches a getter method name pattern of
Parameters:
Returns:
boolean
|
isSetter | ||||||||
isSetter(property: string)
|
||||||||
Checks whether the given property name matches a setter method name pattern of
Parameters:
Returns:
boolean
|
throwExcludedError | ||||||||||||
throwExcludedError(wrapperTypeName: string, property: string)
|
||||||||||||
Throws the error for method execution attemps of excluded properties on a proxy object with an explanatory message.
Parameters:
Returns:
void
|
expectBounds | ||||||||||||||||
expectBounds(makeBounds, northEast: Coord, southWest: Coord)
|
||||||||||||||||
Produces a bounds object using the specified funcion and compares it to the specified corner coords.
Parameters:
Returns:
void
|
expectCoord | ||||||||||||
expectCoord(makeCoord, expected: Coord)
|
||||||||||||
Produces a coord using the specified function and compares it to the expected coord.
Parameters:
Returns:
void
|
expectPath | ||||||||||||
expectPath(makePath, expected: CoordPath)
|
||||||||||||
Produces a path using the specified function and compares it to the expected path.
Parameters:
Returns:
void
|
expectPlace | |||||||||
expectPlace(place: DirectionsPlace, expected: DirectionsPlace)
|
|||||||||
Parameters:
|
expectPositionEquals | ||||||||||||||||
expectPositionEquals(position1: Coord, position2: Coord, geometry?: GeometryTransformService)
|
||||||||||||||||
Shortcuts expecting a literal position match with a native LatLng object.
Uses
Parameters:
|
Hook | ||||||||
Hook(nativeName?: string)
|
||||||||
Marks a component @Output() member that will serve as an emitter of a native event.
Use in components/directive which inherit from
Parameters:
Example :
|
isGoogleMapsFeatureOptions | ||||||||
isGoogleMapsFeatureOptions(feature: any)
|
||||||||
(Type Guard) Determines if the given value is a native feature options object.
Parameters:
Returns:
google.maps.Data.FeatureOptions
|
isGoogleMapsMouseEvent | ||||||||
isGoogleMapsMouseEvent(event: any)
|
||||||||
Checks whether the given value is a native map mouse event object.
Parameters:
Returns:
google.maps.MapMouseEvent
|
itShouldBeAFactoryProviderForNative | ||||||
itShouldBeAFactoryProviderForNative(provider, expectedToken)
|
||||||
Parameters:
|
produceBrowserNativeFactoryProviderSpecs | ||||||||||||||||||||||||
produceBrowserNativeFactoryProviderSpecs(provider, producedNative, runOutsideAngular, expectedToken, expectedNativeType: Type)
|
||||||||||||||||||||||||
Produces specs for native factory providers for browser platforms. See implementation for included tests.
Parameters:
|
produceNativeFactoryProviderSpecs | ||||||||||||||||||||||||||||||||
produceNativeFactoryProviderSpecs(setup, provider, producedNative, runOutsideAngular, expectedToken, expectedNativeType: Type, additionalSpecs?: AdditionalNativeFactoryProviderSpecs)
|
||||||||||||||||||||||||||||||||
Produces specs for native factory providers for both browser and non-browser platforms.
Parameters:
|
itShouldBeAFactoryProviderForWrapperToken | ||||||
itShouldBeAFactoryProviderForWrapperToken(provider, expectedToken)
|
||||||
Parameters:
|
produceBrowserWrapperFactoryProviderSpecs | ||||||||||||||||||||||||
produceBrowserWrapperFactoryProviderSpecs(provider, producedWrapper, expectedToken, expectedWrapperType: Type, expectedNative: any)
|
||||||||||||||||||||||||
Produces specs for wrapper factory providers for browser platforms. See implementation for included tests.
Parameters:
|
produceNonBrowserWrapperFactoryProviderSpecs | ||||||||||||
produceNonBrowserWrapperFactoryProviderSpecs(provider, producedWrapper, expectedToken)
|
||||||||||||
Produces specs for wrapper factory providers for non-browser platforms. See implementation for included tests.
Parameters:
|
produceWrapperFactoryProviderSpecs | ||||||||||||||||||||||||||||||||
produceWrapperFactoryProviderSpecs(setup, provider, producedWrapper, expectedToken, expectedWrapperType: Type, expectedNative: any, additionalSpecs?: AdditionalWrapperFactoryProviderSpecs)
|
||||||||||||||||||||||||||||||||
Produces specs for wrapper factory providers for both browser and non-browser platforms.
Parameters:
|
NativeObjectWrapper | ||||||||||
NativeObjectWrapper(definition: WrapperDefinition)
|
||||||||||
Defines how method calls should be delegated to the native object.
All classes implementing There are 3 pieces to the puzzle:
See Default behaviour:
Custom behaviour:
Parameters:
|
OutsideAngular | ||||||||||||
OutsideAngular(target: Object, methodName: string, descriptor: PropertyDescriptor)
|
||||||||||||
Wraps the method with a call to This should be used inside classes marked with
Parameters:
|
produceBoundsLikeSpecs | ||||||||||||||||
produceBoundsLikeSpecs(expectation: string, test, exclude?)
|
||||||||||||||||
Produces a spec for each supported BoundsLike geometry type and runs the test against the geometry.
Parameters:
Returns:
void
|
produceCoordSpecs | ||||||||||||
produceCoordSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported coord type and runs the test against the coord.
Parameters:
Returns:
void
|
produceDataGeometrySpecs | ||||||||||||
produceDataGeometrySpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported data layer geometry type and runs the test against the geometry.
Parameters:
Returns:
void
|
produceFlexibleDummiesSpecs | ||||||||||||||||||||||||
produceFlexibleDummiesSpecs(flexibles: FlexibleDummies, flexibleType: string, expectation: string, test, exclude)
|
||||||||||||||||||||||||
Parameters:
Returns:
void
|
produceIBoundsSpecs | ||||||||||||
produceIBoundsSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported IBounds implementing types and runs the test against the implementers.
Parameters:
Returns:
void
|
produceMultiPathSpecs | ||||||||||||
produceMultiPathSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported multi path type and runs the test against the path.
Parameters:
Returns:
void
|
produceNativeBoundsSpecs | ||||||||||||
produceNativeBoundsSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported native bounds types and runs the test against the bounds.
Parameters:
Returns:
void
|
producePathSpecs | ||||||||||||
producePathSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported path type (single and multi paths) and runs the test against the path.
Parameters:
Returns:
void
|
produceSinglePathSpecs | ||||||||||||
produceSinglePathSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported single path type and runs the test against the path.
Parameters:
Returns:
void
|
produceFlexiblePlaceSpecs | ||||||||||||
produceFlexiblePlaceSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for the additional types supported by the library as places and runs the test against each place.
Parameters:
Returns:
void
|
produceFlexibleWaypointSpecs | ||||||||||||
produceFlexibleWaypointSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for the additional waypoint types supported by the library and runs the test against each waypoint.
Parameters:
Returns:
void
|
produceNativePlaceSpecs | ||||||||||||
produceNativePlaceSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each native place type and runs the test against the place.
Parameters:
Returns:
void
|
produceNativeWaypointSpecs | ||||||||||||
produceNativeWaypointSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each native waypoint type and runs the test against the waypoint.
Parameters:
Returns:
void
|
producePlaceSpecs | ||||||||||||
producePlaceSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported place type and runs the test against the place.
Parameters:
Returns:
void
|
produceWaypointSpecs | ||||||||||||
produceWaypointSpecs(expectation: string, test)
|
||||||||||||
Produces a spec for each supported waypoint type and runs the test against the waypoint.
Parameters:
Returns:
void
|
setupOverlayWrapperFactoryProviderTest | ||||||||||||
setupOverlayWrapperFactoryProviderTest(factoryProvider: FactoryProvider, config?: WrapperProviderTestConfig)
|
||||||||||||
Configures a testing module for overlay wrapper factories.
Used with
Parameters:
|
testNativeFactoryProvider | ||||||||
testNativeFactoryProvider(testConfig: Omit)
|
||||||||
Performs setup and spec production for native factory providers using the default How:
Creates a testing section with the provider name using
Parameters:
|
testNativeFactoryProviderCore | |||||||||||||||||||||||||||
testNativeFactoryProviderCore(__namedParameters: {providerName: NativeFactoryProviderTest, provider, setup, expectedToken, expectedNativeType, providers, element, additionalSpecs})
|
|||||||||||||||||||||||||||
Performs setup and spec production for native factory providers. How:
Creates a testing section with the provider name using
Parameters:
|
testOverlayNativeFactoryProvider | ||||||||
testOverlayNativeFactoryProvider(testConfig: Omit)
|
||||||||
Performs setup and spec production for native overlay factory providers using the default How:
Creates a testing section with the provider name using
Parameters:
|
testOverlayWrapperFactoryProvider | ||||||||
testOverlayWrapperFactoryProvider(testConfig: Omit)
|
||||||||
Performs setup and spec production for an overlay wrapper factory providers using the default How:
Creates a testing section with the provider name using
Parameters:
|
TestWrapperFactory |
TestWrapperFactory()
|
testWrapperFactoryProvider | ||||||||
testWrapperFactoryProvider(testConfig: Omit)
|
||||||||
Performs setup and spec production for wrapper factory providers using the default How:
Creates a testing section with the provider name using
Parameters:
|
testWrapperFactoryProviderCore | |||||||||||||||||||||||||||
testWrapperFactoryProviderCore(__namedParameters: {providerName: WrapperFactoryProviderTest, provider, setup, expectedToken, expectedWrapperType, mockNative, providers, additionalSpecs})
|
|||||||||||||||||||||||||||
Performs setup and spec production for wrapper factory providers. How:
Creates a testing section with the provider name using
Parameters:
|