F5: README completo (admob/keystore/BD), AGENTS.md nuevo, versionName 1.4.0, tests reales + junit, fix lint RTL
This commit is contained in:
1 parent
a003a94e7a
commit
4a4ed7162d
8 files changed
+163
-55
No files matched your search
+2
-1
@@ -18,7 +18,7 @@ android {
|
||||
applicationId "com.jkanetwork.st.calendariodefrases"
|
||||
minSdk 26
|
||||
targetSdk 36
|
||||
versionName "1.3.5"
|
||||
versionName "1.4.0"
|
||||
// Sube automáticamente la build en cada compilación
|
||||
def versionPropsFile = file('version.count')
|
||||
def Properties versionProps = new Properties()
|
||||
@@ -67,4 +67,5 @@ dependencies {
|
||||
implementation 'com.github.marcohc:robotocalendarview:3.1.1'
|
||||
implementation 'com.google.android.gms:play-services-ads:25.5.0'
|
||||
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.jkanetwork.st.calendariodefrases;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumentation test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.jkanetwork.st.unafrasealdia", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -72,8 +72,8 @@
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:text="(Aqui autor)"
|
||||
android:textAlignment="textEnd"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.jkanetwork.st.calendariodefrases;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Tests de las partes de lógica pura (sin Android framework).
|
||||
*/
|
||||
public class DayKeyTest {
|
||||
|
||||
@Test
|
||||
public void todayKey_formato_yyyymmdd() {
|
||||
String key = new SimpleDateFormat("yyyyMMdd", Locale.US).format(new Date());
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String expected = String.format(Locale.US, "%04d%02d%02d",
|
||||
cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
|
||||
assertEquals(expected, key);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dayKey_comparacionLexicografica_funcionaComoFecha() {
|
||||
// La lógica de getIDFraseDay compara diaArg vs hoy como strings: debe
|
||||
// mantenerse el orden cronológico.
|
||||
assertTrue("20261020".compareTo("20261019") > 0);
|
||||
assertTrue("20261101".compareTo("20261031") > 0);
|
||||
assertTrue("20270101".compareTo("20261231") > 0);
|
||||
}
|
||||
|
||||
private static void assertTrue(boolean b) {
|
||||
org.junit.Assert.assertTrue(b);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.jkanetwork.st.calendariodefrases;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
#Tue Oct 20 12:57:40 UTC 2026
|
||||
VERSION_CODE=370
|
||||
#Tue Oct 20 13:03:03 UTC 2026
|
||||
VERSION_CODE=378
|
||||
Reference in new issue
Block a user