added apikey readByApikey

This commit is contained in:
snoop 2017-09-21 19:24:24 +09:00
parent 03e8d2711c
commit cf70bc7bcb
2 changed files with 14 additions and 0 deletions

View File

@ -37,4 +37,8 @@ public class ApiKeyService {
return true;
}
public ApiKey readByApiKey(String apiKey) {
return this.apiKeyDAO.findByApiKey(apiKey);
}
}

View File

@ -1,5 +1,6 @@
package com.loafle.overflow.module.apikey.service;
import com.google.protobuf.Api;
import com.loafle.overflow.module.apikey.model.ApiKey;
import com.loafle.overflow.module.domain.model.Domain;
import com.loafle.overflow.spring.AppConfigTest;
@ -68,4 +69,13 @@ public class ApiKeyServiceTest {
}
@Test
public void readByApiKey() {
ApiKey apiKey = this.apiKeyService.readByApiKey("52abd6fd57e511e7ac52080027658d13");
Assert.assertNotEquals(apiKey, null);
}
}