PAN-15 Updated the gradle dependencies

This commit is contained in:
dantanxiaotian
2019-03-10 16:18:19 -06:00
parent ba37ffeb57
commit 10b0a09690
3 changed files with 16 additions and 16 deletions
+6 -1
View File
@@ -18,11 +18,16 @@ repositories {
}
dependencies {
compile project(':persistence')
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.11'
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.7'
compile group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
compile group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '2.1.3.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-devtools', version: '2.1.3.RELEASE'
compile group: 'org.springframework', name: 'spring-web', version: '5.1.5.RELEASE'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile fileTree(dir: 'lib', include: '**/*.jar')
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.springframework', name: 'spring-test', version: '5.1.5.RELEASE'
}
@@ -2,6 +2,7 @@ package edu.msudenver.tsp.services.dto;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@@ -11,6 +12,7 @@ import java.io.Serializable;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
public class Account extends BaseDto implements Serializable {
@Size(max = 50) private String username;
@Size(max = 256) private String password;
@@ -1,9 +1,8 @@
package edu.msudenver.tsp.services.parser;
import edu.msudenver.tsp.persistence.controller.DefinitionController;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Spy;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.ArrayList;
@@ -12,18 +11,12 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class ParserServiceTest {
private final DefinitionController definitionControllerMock = mock(DefinitionController.class);
private final ParserService mockParserService = mock(ParserService.class);
@InjectMocks
private final ParserService parserService = new ParserService(definitionControllerMock, null,
null, null);
@Spy private ParserService parserService;
@Test
public void testEmptyStringEqualsEmptyString() {
@@ -106,8 +99,8 @@ public class ParserServiceTest {
final List<String> expectedList = new ArrayList<>();
expectedList.add("");
when(mockParserService.parseRawInput(anyString())).thenReturn(new Node("", null));
final List<String> actualList = parserService.retrieveStatements(mockParserService.parseRawInput(""));
when(parserService.parseRawInput(anyString())).thenReturn(new Node("", null));
final List<String> actualList = parserService.retrieveStatements(parserService.parseRawInput(""));
assertEquals(expectedList, actualList);
}
@@ -124,8 +117,8 @@ public class ParserServiceTest {
testNode.setRight(new Node("then", testNode));
testNode.getRight().setCenter(new Node(" x^2 is even", testNode.getRight()));
when(mockParserService.parseRawInput(anyString())).thenReturn(testNode);
final List<String> actualList = parserService.retrieveStatements(mockParserService.parseRawInput("baseCase"));
when(parserService.parseRawInput(anyString())).thenReturn(testNode);
final List<String> actualList = parserService.retrieveStatements(parserService.parseRawInput("baseCase"));
assertEquals(expectedList, actualList);
}
@@ -133,8 +126,8 @@ public class ParserServiceTest {
@Test
public void testDriveParseUserInput() {
final Node testNode = new Node("", null);
when(mockParserService.parseRawInput(anyString())).thenReturn(testNode);
when(mockParserService.retrieveStatements(testNode)).thenReturn(new ArrayList<>());
when(parserService.parseRawInput(anyString())).thenReturn(testNode);
when(parserService.retrieveStatements(testNode)).thenReturn(new ArrayList<>());
final boolean successfulTestDrive = parserService.parseUserInput("");