TDD study # 1 environment construction & first test-driven development (July 6th, 2020)

I built a java environment.

Operating environment

vscode java environment construction

I saw the site below https://qiita.com/takuma-jpn/items/b49785a314fb4db85775

Immediately struggling with Hello World!

A program that displays Hello World! in java ↓

Test.java



public class Test {
    public static void main(String[] args) {
        System.out.println("Hello.World!");
    }
}

Apparently it is necessary to match the file name and the class name. It was a swamp. After that, create launch.json. Select a folder and make it a project (?)

TDD worked using maven

I saw the site below. https://engineeringnote.hateblo.jp/entry/java/junit_with_maven_in_vscode

Notes It is necessary to check maven in javahome from the settings.

I don't understand java in the first place

How the class works

class.java


class AA{
    AA();        //constructor(?)
    void BB(){
    AA C = new AA();   //instance(?)
    C.BB()
    }
}

New knowledge (keyword)

--new operator --assertEquals (argument 1, argument 2): Method to check if the arguments are equal

in conclusion

I tried to test with python with vscode (translate java test to python), but the environment construction was successful, but I gave up because I didn't know how to write around class. I will study TDD in java, which I am not used to for the time being.

Recommended Posts

TDD study # 1 environment construction & first test-driven development (July 6th, 2020)
TDD study # 2 (July 13th, 2020)
TDD study # 5 (July 18th, 2020)
TDD study # 4 (July 16th, 2020)
TDD study # 3 (July 15th, 2020)
java development environment construction
Rails6 development environment construction [Mac]
Environment construction for Servlet application development
[Unity] Android development environment construction procedure
CentOS8 + Anaconda + Django development environment construction procedure
[Processing x Java] Construction of development environment
Laravel development environment construction with Docker (Mac)
Sapper × Go (echo) × Docker development environment construction
Universal Robotics UR Caps development environment construction
Java development environment construction memo on Mac
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Spring Boot + Docker Java development environment construction
[Jakarta EE 8 application development with Gradle] 1. Environment construction
Development environment construction using IntelliJ IDEA + Maven + Tomcat 9
A reminder of Docker and development environment construction
Ruby on Rails development environment construction on M1 Mac
[First team development ②] Build an environment with Docker
Django development environment construction using Docker-compose (personal memorandum)
Wordpress local environment construction & development procedure with Docker