Skip to content

Yusuf erdem patch 1 #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: coverage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lab-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
secrets:
THUNDRA_LAB_APIKEY:
required: true

env:
WORKFLOW_TELEMETRY_BASE_URL: https://api.service.runforesight.me
jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: CI for sample-container-todo-app-java-maven for lab


on:
push:
branches: [ main ]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/staging-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: CI for sample-container-todo-app-java-maven for staging

on:
push:
branches: [ main ]
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/tolgatakir/todo/TodoApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@SpringBootApplication
public class TodoApplication {


public static void main(String[] args) {
SpringApplication.run(TodoApplication.class, args);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
@RestController
@RequestMapping("/todos")
public class TodoController {


private final TodoService service;

public TodoController(TodoService service) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/tolgatakir/todo/service/TodoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public interface TodoService {
List<Todo> findTodos();

Todo addTodo(Todo todo);

int multiply();

Todo updateTodo(Long id, Todo todo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public List<Todo> findTodos() {
.map(entity -> new Todo(entity.getId(), entity.getTitle(), entity.isCompleted()))
.collect(Collectors.toList());
}

@Override
public int multiply() {
return 3*5;
}

@Override
public Todo addTodo(Todo request) {
Expand All @@ -47,6 +52,7 @@ public Todo updateTodo(Long id, Todo request) {
return new Todo(entity.getId(), entity.getTitle(), entity.isCompleted());
}


@Override
public void deleteTodo(Long id) {
repository.deleteById(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.when;


/**
* @author tolgatakir
*/
Expand Down