use of ca.corefacility.bioinformatics.irida.service.impl.RemoteAPITokenServiceImpl in project irida by phac-nml.
the class RemoteAPITokenServiceImplTest method setUp.
@Before
public void setUp() {
tokenRepository = mock(RemoteApiTokenRepository.class);
userRepo = mock(UserRepository.class);
oauthClient = mock(OAuthClient.class);
service = new RemoteAPITokenServiceImpl(tokenRepository, userRepo, oauthClient);
user = new User("tom", "an@email.com", "password1", "tom", "matthews", "123456789");
remoteAPI = new RemoteAPI("apiname", "http://nowhere", "a test api", "clientId", "clientSecret");
SecurityContextHolder.getContext().setAuthentication(new TestingAuthenticationToken(user, null));
remoteAPIToken = new RemoteAPIToken("token", remoteAPI, new Date());
}
Aggregations