Skip to content

Commit

Permalink
Removed unnecessary edit command Test.
Browse files Browse the repository at this point in the history
Improve toString method of Activity for feedback
  • Loading branch information
marxlow committed Nov 6, 2016
1 parent 1d89ab0 commit 88d4cdf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 35 deletions.
9 changes: 0 additions & 9 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/slf4j-log4j12-1.7.10.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/slf4j-api-1.7.21.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/slf4j-api-1.7.10.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/natty-0.12.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/log4j-1.2.17.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/javax.mail.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/gunit-3.5.2.jar"/>
<classpathentry exported="true" kind="lib" path="/Users/lowjiansheng/Documents/Menion/src/main/resources/dependencies/antlr-runtime-3.5.2.jar"/>

<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ default String getTaskAsText() {
.append("\nDeadline: ")
.append(getActivityStartDate().toFormattedDateString());
if (!getActivityStartTime().toString().equals(ActivityTime.INFERRED_TIME)){
builder.append("\nat:")
builder.append(", ")
.append(getActivityStartTime());
}
if (getNote().toString() != null){
Expand All @@ -152,19 +152,19 @@ default String getEventAsText() {
final StringBuilder builder = new StringBuilder();

builder.append(getActivityName())
.append(" Starting at: ")
.append("\nStarting from: ")
.append(getActivityStartDate().toFormattedDateString());

if (!getActivityStartTime().toString().equals(ActivityTime.INFERRED_TIME)){
builder.append("\nat: ")
builder.append(", ")
.append(getActivityStartTime());
}

builder.append("\nEnding at: ")
.append(getActivityEndDate().toFormattedDateString());

if (!getActivityStartTime().toString().equals(ActivityTime.INFERRED_TIME)){
builder.append("\nat: ")
builder.append(", ")
.append(getActivityEndTime());
}

Expand Down
22 changes: 0 additions & 22 deletions src/test/java/guitests/EditCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,7 @@ public void Edit() {
assertFloatingEditNoteSuccess(floating, 1, "Floating Hello Note");
assertTaskEditNoteSuccess(task, 1, "Task Hello Note");
assertEventEditNoteSuccess(event, 1, "Event Hello Note");

/**
* Editting for single parameters no longer works due to natty.
* I.e editting time/date alone does not work.
// Edit Date - For Task
assertTaskEditDateTimeSuccess(task, 1, "30-11-1994");
// Edit Time - For Task
assertTaskEditDateTimeSuccess(task, 1, "2359");
// Edit From Date - For Event
assertEventEditFromDateTimeSuccess(event, 1, "30-11-1994");
// Edit From Time - For Event
assertEventEditFromDateTimeSuccess(event, 1, "2359");
// Edit To Date - For Event
assertEventEditToDateTimeSuccess(event, 1, "20-02-2016");
// Edit to Time - For Event.
assertEventEditToDateTimeSuccess(event, 1, "1200");

*/

// Edit Both, Date/Time - For Task
assertTaskEditBothDateTimeSuccess(task, 1, "10-10-2016 1000");
Expand Down

0 comments on commit 88d4cdf

Please sign in to comment.