LiteralTransformer rotate and shuffle tests refactoring

This commit is contained in:
sanex3339
2020-01-14 00:31:09 +03:00
parent fb1a927c38
commit 309c678888
9 changed files with 182 additions and 222 deletions
@@ -21,6 +21,16 @@ import { MapStorage } from '../MapStorage';
@injectable()
export class StringArrayStorage extends MapStorage <string, IStringArrayStorageItemData> implements IStringArrayStorage {
/**
* @type {number}
*/
private static readonly minimumRotationAmount: number = 100;
/**
* @type {number}
*/
private static readonly maximumRotationAmount: number = 500;
/**
* @type {number}
*/
@@ -124,7 +134,10 @@ export class StringArrayStorage extends MapStorage <string, IStringArrayStorageI
this.stringArrayStorageCallsWrapperName = `${this.options.identifiersPrefix}${baseStringArrayCallsWrapperName}`;
this.rotationAmount = this.options.rotateStringArray
? this.randomGenerator.getRandomInteger(100, 500)
? this.randomGenerator.getRandomInteger(
StringArrayStorage.minimumRotationAmount,
StringArrayStorage.maximumRotationAmount
)
: 0;
}