-
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.
- Loading branch information
Showing
196 changed files
with
2,919 additions
and
776 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
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
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/ryey/easer/plugins/event/battery/BatteryEventDataTest.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.battery; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class BatteryEventDataTest { | ||
|
||
public static BatteryEventData createDummyData() { | ||
BatteryEventData dummyData = new BatteryEventData(); | ||
dummyData.set(1); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
BatteryEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
BatteryEventData parceledData = BatteryEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...src/androidTest/java/ryey/easer/plugins/event/bluetooth_device/BTDeviceEventDataTest.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.bluetooth_device; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class BTDeviceEventDataTest { | ||
|
||
public static BTDeviceEventData createDummyData() { | ||
BTDeviceEventData dummyData = new BTDeviceEventData(); | ||
dummyData.set(new String[]{"device1", "dev2"}); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
BTDeviceEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
BTDeviceEventData parceledData = BTDeviceEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
app/src/androidTest/java/ryey/easer/plugins/event/broadcast/BroadcastEventDataTest.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,32 @@ | ||
package ryey.easer.plugins.event.broadcast; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class BroadcastEventDataTest { | ||
|
||
public static BroadcastEventData createDummyData() { | ||
BroadcastEventData dummyData = new BroadcastEventData(); | ||
ReceiverSideIntentData intentData = new ReceiverSideIntentData(); | ||
intentData.action.add("action1"); | ||
intentData.action.add("action2"); | ||
intentData.category.add("category1"); | ||
intentData.category.add("category2"); | ||
dummyData.set(intentData); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
BroadcastEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
BroadcastEventData parceledData = BroadcastEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
app/src/androidTest/java/ryey/easer/plugins/event/calendar/CalendarEventDataTest.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,34 @@ | ||
package ryey.easer.plugins.event.calendar; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class CalendarEventDataTest { | ||
|
||
public static CalendarEventData createDummyData() { | ||
CalendarEventData dummyData = new CalendarEventData(); | ||
CalendarData calendarData = new CalendarData(); | ||
calendarData.calendar_id = 20; | ||
for (int i = 0; i < CalendarData.condition_name.length; i++) { | ||
if (i % 2 == 0) { | ||
calendarData.conditions.add(CalendarData.condition_name[i]); | ||
} | ||
} | ||
dummyData.set(calendarData); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
CalendarEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
CalendarEventData parceledData = CalendarEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...src/androidTest/java/ryey/easer/plugins/event/celllocation/CellLocationEventDataTest.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.celllocation; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class CellLocationEventDataTest { | ||
|
||
public static CellLocationEventData createDummyData() { | ||
CellLocationEventData dummyData = new CellLocationEventData(); | ||
dummyData.set(new String[]{"1-2", "2-3"}); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
CellLocationEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
CellLocationEventData parceledData = CellLocationEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...src/androidTest/java/ryey/easer/plugins/event/connectivity/ConnectivityEventDataTest.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.connectivity; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class ConnectivityEventDataTest { | ||
|
||
public static ConnectivityEventData createDummyData() { | ||
ConnectivityEventData dummyData = new ConnectivityEventData(); | ||
dummyData.set(new String[]{"1", "2"}); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
ConnectivityEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
ConnectivityEventData parceledData = ConnectivityEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
app/src/androidTest/java/ryey/easer/plugins/event/date/DateEventDataTest.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.date; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.Calendar; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class DateEventDataTest { | ||
|
||
public static DateEventData createDummyData() { | ||
DateEventData dummyData = new DateEventData(); | ||
Calendar calendar = Calendar.getInstance(); | ||
calendar.set(Calendar.DAY_OF_MONTH, 2); | ||
dummyData.set(calendar); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
DateEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
DateEventData parceledData = DateEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/ryey/easer/plugins/event/dayofweek/DayOfWeekEventDataTest.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.dayofweek; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class DayOfWeekEventDataTest { | ||
|
||
public static DayOfWeekEventData createDummyData() { | ||
DayOfWeekEventData dummyData = new DayOfWeekEventData(); | ||
dummyData.set(new String[]{"2", "4", "5"}); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
DayOfWeekEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
DayOfWeekEventData parceledData = DayOfWeekEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
app/src/androidTest/java/ryey/easer/plugins/event/sms/SmsEventDataTest.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,30 @@ | ||
package ryey.easer.plugins.event.sms; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class SmsEventDataTest { | ||
|
||
public static SmsEventData createDummyData() { | ||
SmsEventData dummyData = new SmsEventData(); | ||
SmsInnerData innerData = new SmsInnerData(); | ||
innerData.sender = "15077707777"; | ||
innerData.content = "aaa"; | ||
dummyData.set(innerData); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
SmsEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
SmsEventData parceledData = SmsEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
app/src/androidTest/java/ryey/easer/plugins/event/time/TimeEventDataTest.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.time; | ||
|
||
import android.os.Parcel; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.Calendar; | ||
|
||
import ryey.easer.plugins.operation.TestHelper; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class TimeEventDataTest { | ||
|
||
public static TimeEventData createDummyData() { | ||
TimeEventData dummyData = new TimeEventData(); | ||
Calendar calendar = Calendar.getInstance(); | ||
calendar.set(Calendar.MONTH, 3); | ||
dummyData.set(calendar); | ||
return dummyData; | ||
} | ||
|
||
@Test | ||
public void testParcel() { | ||
TimeEventData dummyData = createDummyData(); | ||
Parcel parcel = TestHelper.writeToParcel(dummyData); | ||
TimeEventData parceledData = TimeEventData.CREATOR.createFromParcel(parcel); | ||
assertEquals(dummyData, parceledData); | ||
} | ||
|
||
} |
Oops, something went wrong.