Skip to content

Commit

Permalink
Merged hotfix/5.2.12 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoiosue committed May 16, 2016
2 parents c6c6720 + 3367ed4 commit 996e40e
Show file tree
Hide file tree
Showing 16 changed files with 357 additions and 123 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

MIN_SDK=14
TARGET_SDK=23
VERSION_NAME=5.2.11
VERSION_CODE=215
VERSION_NAME=5.2.12
VERSION_CODE=216
PACKAGE=it.feio.android.omninotes

# The following properties are empty defaults to allow build and can EVENTUALLY be overridden to allow:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test;
package it.feio.android.omninotes;

import android.test.AndroidTestCase;
import android.test.RenamingDelegatingContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package it.feio.android.omninotes.test;
/*
* Copyright (C) 2016 Federico Iosue (federico.iosue@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatibehaon, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes;

import it.feio.android.omninotes.MainActivity;
import com.robotium.solo.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package it.feio.android.omninotes.test;
/*
* Copyright (C) 2016 Federico Iosue (federico.iosue@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatibehaon, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes;

import android.test.ActivityInstrumentationTestCase2;
import android.widget.EditText;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package it.feio.android.omninotes.test;
/*
* Copyright (C) 2016 Federico Iosue (federico.iosue@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatibehaon, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes;

import android.test.ActivityInstrumentationTestCase2;
import com.neopixl.pixlui.components.textview.TextView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* Copyright (C) 2015 Federico Iosue (federico.iosue@gmail.com)
* Copyright (C) 2016 Federico Iosue (federico.iosue@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* the Free Software Foundatibehaon, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
Expand All @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test;
package it.feio.android.omninotes;

import android.os.AsyncTask;
import android.test.ActivityInstrumentationTestCase2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test.db;
package it.feio.android.omninotes.db;

import android.test.AndroidTestCase;
import android.test.RenamingDelegatingContext;
import it.feio.android.omninotes.db.DbHelper;
import it.feio.android.omninotes.models.Note;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test.helpers;
package it.feio.android.omninotes.helpers;

import android.test.InstrumentationTestCase;
import it.feio.android.omninotes.helpers.NotesHelper;
import it.feio.android.omninotes.models.Note;
import it.feio.android.omninotes.utils.Constants;
import org.apache.commons.lang.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test.utils;
package it.feio.android.omninotes.utils;

import android.test.InstrumentationTestCase;
import it.feio.android.omninotes.OmniNotes;
import it.feio.android.omninotes.utils.ConnectionManager;
import it.feio.android.omninotes.utils.GeocodeHelper;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright (C) 2016 Federico Iosue (federico.iosue@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatibehaon, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.utils;

import android.app.PendingIntent;
import android.content.Intent;
import android.test.InstrumentationTestCase;
import android.util.Log;
import it.feio.android.omninotes.models.Note;
import it.feio.android.omninotes.utils.ReminderHelper;
import org.junit.Test;

import java.util.Calendar;

import static org.junit.Assert.assertEquals;


public class ReminderHelperTest extends InstrumentationTestCase {

@Test
public void testGetRequestCode() {
Long now = Calendar.getInstance().getTimeInMillis();
Note note = new Note();
note.setAlarm(now);
int requestCode = ReminderHelper.getRequestCode(note);
int requestCode2 = ReminderHelper.getRequestCode(note);
assertEquals(requestCode, requestCode2);
assertTrue(String.valueOf(now).startsWith(String.valueOf(requestCode)));
}


public void testAddReminder() {
Note note = buildNote();
ReminderHelper.addReminder(getInstrumentation().getTargetContext(), note);
boolean reminderActive = ReminderHelper.checkReminder(getInstrumentation().getTargetContext(), note);
assertTrue(reminderActive);
}


public void testRemoveReminder() {
Note note = buildNote();
ReminderHelper.addReminder(getInstrumentation().getTargetContext(), note);
boolean reminderActive = ReminderHelper.checkReminder(getInstrumentation().getTargetContext(), note);
ReminderHelper.removeReminder(getInstrumentation().getTargetContext(), note);
boolean reminderRemoved = ReminderHelper.checkReminder(getInstrumentation().getTargetContext(), note);
assertTrue(reminderActive);
assertFalse(reminderRemoved);
}


private Note buildNote() {
Long now = Calendar.getInstance().getTimeInMillis();
Note note = new Note();
note.setCreation(now);
note.setAlarm(now);
return note;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test.utils;
package it.feio.android.omninotes.utils;

import android.test.InstrumentationTestCase;

import it.feio.android.omninotes.utils.Security;

public class SecurityTest extends InstrumentationTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package it.feio.android.omninotes.test.utils.date;
package it.feio.android.omninotes.utils.date;

import android.test.InstrumentationTestCase;
import it.feio.android.omninotes.helpers.date.DateHelper;
Expand Down
Loading

0 comments on commit 996e40e

Please sign in to comment.