Giter VIP home page Giter VIP logo

javatdd's Introduction

JavaTDD

Issues GitHub pull requests

Table of contents

Java fundamentals

  1. String - "Hello, world"
  2. Conditions - > , < , >=, <=, ==, !=
  3. Statements - if/else, switch
  4. Primitive - byte, short, int, long, float, double, boolean, char and test their edges.
  5. Loops - while loop and for loop
  6. Exception - TBD
  7. Design Pattern - TBD
  8. Lambda
    1. Functional Interface

more...

Code expected

  • Proper naming for variables, avoid using i,v,k...etc. The variable name should be self explanatory.
  • Proper names for files
  • Follow unit tests naming conventions - MethodName_StateUnderTest_ExpectedBehavior
    String hello(String name) {
        return "Hello World " + name;
    }

    @Test
    void hello_InputName_HelloWorldWithName() {
        String result = helloWorld.hello("Name");
        assertEquals("Hello World Name", result);
    }

Import and Execute

It's a Gradle project, can be simply imported by any IDE such as Eclipse, Intellij.
Firstly , git clone https://github.com/fengyuanyang/JavaTDD.git
Secondly, open with build.gradle file. IDE should do the rest of importing and dependencies download.
Thirdly, open any test file you would like to execute, run it.

Background

As time goes by, project is getting bigger, people who wrote that code might have been missing.
How could I refactor those code I don't even know why the logic like this.
TDD is a perfect way for me to refactor or start the codes. What I need to do is trying my best to pass all the tests.

javatdd's People

Contributors

a-annan avatar farzado avatar fengyuanyang avatar frosse avatar ipapast avatar januslinhc avatar kaash-bot avatar ldrf avatar liun03 avatar mcruzdev avatar mete23 avatar raksit31667 avatar ravidyarev avatar singloon avatar sknot-rh avatar skyousuf1070 avatar syeda-azim avatar tegridy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.