@Test void generate_GitHubKey() { final String owner = "sgfgs"; final String repo = "szgff"; final String platform = Platform.GITHUB.name(); final String result = (String) keyGenerator.generate(randomTarget, randomMethod, platform, owner + "|FR|" + repo + "|FR|435"); assertThat(result).isEqualTo(platform + "-" + owner + "-" + repo); }
@Override public Object generate(final Object target, final Method method, final Object... params) { final String platform = (String) params[0]; if (Platform.GITHUB.name().equalsIgnoreCase(platform)) { return generateGitHubKey(platform, (String) params[1]); } return fallbackKeyGenerator.generate(target, method, params); }
GetAllPossibleTokensKeyGenerator implements KeyGenerator { @Override public Object generate(final Object target, final Method method, final Object... params) { final String platform = (String) params[0]; if (Platform.GITHUB.name().equalsIgnoreCase(platform)) { return generateGitHubKey(platform, (String) params[1]); } return fallbackKeyGenerator.generate(target, method, params); } }
GetAllPossibleTokensKeyGenerator implements KeyGenerator { @Override public Object generate(final Object target, final Method method, final Object... params) { final String platform = (String) params[0]; if (Platform.GITHUB.name().equalsIgnoreCase(platform)) { return generateGitHubKey(platform, (String) params[1]); } return fallbackKeyGenerator.generate(target, method, params); } GetAllPossibleTokensKeyGenerator(final KeyGenerator simpleKeyGenerator); }
GetAllPossibleTokensKeyGenerator implements KeyGenerator { @Override public Object generate(final Object target, final Method method, final Object... params) { final String platform = (String) params[0]; if (Platform.GITHUB.name().equalsIgnoreCase(platform)) { return generateGitHubKey(platform, (String) params[1]); } return fallbackKeyGenerator.generate(target, method, params); } GetAllPossibleTokensKeyGenerator(final KeyGenerator simpleKeyGenerator); @Override Object generate(final Object target, final Method method, final Object... params); }
GetAllPossibleTokensKeyGenerator implements KeyGenerator { @Override public Object generate(final Object target, final Method method, final Object... params) { final String platform = (String) params[0]; if (Platform.GITHUB.name().equalsIgnoreCase(platform)) { return generateGitHubKey(platform, (String) params[1]); } return fallbackKeyGenerator.generate(target, method, params); } GetAllPossibleTokensKeyGenerator(final KeyGenerator simpleKeyGenerator); @Override Object generate(final Object target, final Method method, final Object... params);  }