-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documents && Change version to v0.5
- Loading branch information
Showing
79 changed files
with
2,042 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/ryey/easer/plugins/event/nfc_tag/NfcTagEventDataTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ryey.easer.plugins.event.nfc_tag; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class NfcTagEventDataTest { | ||
|
||
public static NfcTagEventData createDummyData() { | ||
NfcTagEventData dummyData = new NfcTagEventData(); | ||
dummyData.set("01479362"); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
NfcTagEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
NfcTagEventData parceledData = NfcTagEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
app/src/androidTest/java/ryey/easer/plugins/event/timer/TimerEventDataTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package ryey.easer.plugins.event.timer; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class TimerEventDataTest { | ||
|
||
public static TimerEventData createDummyData() { | ||
TimerEventData dummyData = new TimerEventData(); | ||
TimerEventData.Timer timer = new TimerEventData.Timer(); | ||
timer.exact = true; | ||
timer.repeat = true; | ||
timer.minutes = 102; | ||
dummyData.set(timer); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
TimerEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
TimerEventData parceledData = TimerEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
app/src/androidTest/java/ryey/easer/plugins/operation/alarm/AlarmOperationDataTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ryey.easer.plugins.operation.alarm; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.Calendar; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class AlarmOperationDataTest { | ||
|
||
public static AlarmOperationData createDummyData() { | ||
AlarmOperationData dummyData = new AlarmOperationData(); | ||
AlarmOperationData.AlarmData alarmData = new AlarmOperationData.AlarmData(); | ||
alarmData.time = Calendar.getInstance(); | ||
alarmData.message = "my message"; | ||
alarmData.absolute = false; | ||
dummyData.set(alarmData); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
AlarmOperationData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
AlarmOperationData parceledData = AlarmOperationData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.