Week 4 - Day 1: Git, GitLab, IntelliJ, Refactoring, Unit Testing

Objectives for Day 1

Summary

Get the class off to a great start with a review of git, introduction to gitlab.com, refactoring, automated testing, and unit testing. Use Intellij to create and run tests.

Prerequisites

  • Familiar with: Java, git
  • Java SDK 8 installed
  • IntelliJ IDEA Community Edition installed
  • git installed locally

Exercises

  • Where do your Java test files go?
  • How does Unit testing help with refactoring or updating code?
  • If you needed the same type of variable for each of your test methods, which should you use @Before or @BeforeClass?
  • Should you test getters and setters in unit tests?
  • Should you aim to one or multiple asserts in single test method?