This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim-buster | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT [ "python" ] | |
CMD [ "app.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim-buster | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT [ "python" ] | |
CMD [ "app.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sampleservice.demo.validator; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.server.ResponseStatusException; | |
import java.util.Optional; | |
@Component | |
public class StudentValidator { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sampleservice.demo.controller; | |
import static org.mockito.AdditionalMatchers.or; | |
import static org.mockito.Mockito.isA; | |
import static org.mockito.Mockito.isNull; | |
import static org.mockito.Mockito.when; | |
import com.sampleservice.demo.dto.inbound.StudentInDTO; | |
import com.sampleservice.demo.model.Student; | |
import com.sampleservice.demo.service.StudentServiceImpl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sampleservice.demo.service; | |
import com.sampleservice.demo.validator.StudentValidator; | |
import com.sampleservice.demo.dao.StudentDAO; | |
import com.sampleservice.demo.model.Student; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Transactional; | |
import java.util.Collection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Sample Controller that exposes a bunch of endpoints that allow operations | |
* such as CREATE, READ, DELETE and LIST users. | |
* | |
* @author Rafiullah Hamedy | |
*/ | |
package com.sampleservice.demo.controller; | |
import java.util.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.diffblue.demo; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import static org.junit.jupiter.api.Assertions.assertFalse; | |
import static org.junit.jupiter.api.Assertions.assertThrows; | |
import static org.junit.jupiter.api.Assertions.assertTrue; | |
import org.junit.jupiter.api.Test; | |
public class UtilityTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.diffblue.demo; | |
import org.springframework.util.Assert; | |
/** | |
* The following methods are used to automatically generate unit test for. | |
*/ | |
public class Utility { | |
enum Color { | |
RED, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'org.springframework.boot' version '2.3.1.RELEASE' | |
id 'io.spring.dependency-management' version '1.0.9.RELEASE' | |
id 'java' | |
id 'eclipse' | |
id 'jacoco' | |
} | |
group = 'codecov.article' | |
version = '0.0.1-SNAPSHOT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<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> | |
<version>2.3.1.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
NewerOlder