Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dann41 committed May 27, 2018
1 parent d3e96ad commit 0bf6861
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/scmspain/MsFcTechTestApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.scmspain.configuration.TweetConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static class LinkExtractor {
private String shortText;
private List<String> links;

public LinkExtractor(String text) {
LinkExtractor(String text) {
this.text = text;
extractLinks();
}
Expand All @@ -64,11 +64,11 @@ private void extractLinks() {
}
}

public String getShortText() {
String getShortText() {
return shortText;
}

public List<String> getLinks() {
List<String> getLinks() {
return links;
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/scmspain/controller/TweetController.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

@RestController
public class TweetController {
private TweetService tweetService;

private final TweetService tweetService;

public TweetController(TweetService tweetService) {
this.tweetService = tweetService;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/scmspain/entities/Tweet.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Tweet {
@Column(nullable = false, length = MAX_TWEET_LENGTH)
private String tweet;

@Column(name="pre2015migrationstatus", nullable=true)
@Column(name="pre2015migrationstatus")
private Long pre2015MigrationStatus = 0L;

@OneToMany(targetEntity=TweetLink.class, cascade=CascadeType.ALL, mappedBy="tweet")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/scmspain/services/TweetService.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface TweetService {

/**
* Discards a tweet
* @param tweetId
* @param tweetId id of the tweet
*/
void discardTweet(Long tweetId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TweetWithLinksBuilderTest {
private TweetWithLinksBuilder builder;

@Before
public void setUp() throws Exception {
public void setUp() {
builder = new TweetWithLinksBuilder();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import com.scmspain.configuration.TestConfiguration;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.MediaType;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.WebApplicationContext;

import javax.persistence.EntityManager;
import java.util.List;

import static java.lang.String.format;
Expand Down

0 comments on commit 0bf6861

Please sign in to comment.