Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
agile-java
/
AgileJavaAndroid
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8d5faa1a
authored
May 16, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lesson 1 is done
parent
973fb101
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
app/src/main/java/com/example/paktalin/agilejava/Student.java
app/src/test/java/com/example/paktalin/agilejava/StudentTest.java
app/src/main/java/com/example/paktalin/agilejava/Student.java
View file @
8d5faa1a
...
...
@@ -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
;
}
}
app/src/test/java/com/example/paktalin/agilejava/StudentTest.java
View file @
8d5faa1a
...
...
@@ -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
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment