Commit 8d5faa1a by Paktalin

Lesson 1 is done

parent 973fb101
......@@ -5,8 +5,13 @@ package com.example.paktalin.agilejava;
*/
class Student {
Student(String name) {
private String name;
Student(String name) {
this.name = name;
}
String getName() {
return name;
}
}
......@@ -10,6 +10,12 @@ import junit.framework.TestCase;
public class StudentTest extends TestCase {
public void testCreate() {
Student student = new Student("Jane Doe");
final String firstStudentName = "Jane Doe";
Student student = new Student(firstStudentName);
assertEquals(firstStudentName, student.getName());
final String secondStudentName = "Joe Blow";
Student secondStudent = new Student(secondStudentName);
assertEquals(secondStudentName, secondStudent.getName());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment