[Add] Android docs: SharedPreferences & JUnit (#7243)

pull/7246/head
Brian Rodriguez 2 months ago committed by GitHub
parent c0b1337755
commit b29d8150c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      src/data/roadmaps/android/content/junit@gvGAwjk_nhEgxzZ_c3f6b.md
  2. 7
      src/data/roadmaps/android/content/shared-preferences@PKql1HY0PLMfp50FRELXL.md

@ -1,3 +1,8 @@
# JUnit # JUnit
JUnit is a popular testing framework for Java programming. It forms the basis for many other testing libraries and tools in the Android ecosystem, making it important for any Android developer to become familiar with. The basic use of JUnit involves annotations such as `@Test`, indicating methods that represent a single test case. Other useful features include `@Before` and `@After` which allow for setup and teardown processes to be defined clearly. Another powerful feature in JUnit is the ability to create parameterized tests, effectively running the same test multiple times with different inputs. **JUnit** is a popular testing framework for Java programming. It forms the basis for many other testing libraries and tools in the Android ecosystem, making it important for any Android developer to become familiar with. The basic use of JUnit involves annotations such as `@Test`, indicating methods that represent a single test case. Other useful features include `@Before` and `@After` which allow for setup and teardown processes to be defined clearly. Another powerful feature in JUnit is the ability to create parameterized tests, effectively running the same test multiple times with different inputs.
Visit the following resources to learn more:
- [@official@Documentation](https://developer.android.com/training/testing/local-tests)
- [@video@Junit for android](https://www.youtube.com/watch?v=jE1vQGVHaQA)

@ -1,3 +1,8 @@
# Shared Preferences # Shared Preferences
Shared Preferences in Android are used to store data in key-value pairs. It works similar to a tiny database where you can save small pieces of data such as settings or the state of an application. When data is saved to Shared Preferences, it persists across user sessions, even if your application is killed or gets deleted. Data in Shared Preferences is not typically used for large amounts of data. To perform actions such as saving, retrieving, or editing data in Shared Preferences, you use an instance of `SharedPreferences.Editor`. Shared Preferences in Android are used to store data in **key-value** pairs. It works similar to a tiny database where you can save small pieces of data such as settings or the state of an application. When data is saved to Shared Preferences, it persists across user sessions, even if your application is killed or gets deleted. Data in Shared Preferences is not typically used for large amounts of data. To perform actions such as saving, retrieving, or editing data in Shared Preferences, you use an instance of `SharedPreferences.Editor`.
Visit the following resources to learn more:
- [@official@Documentation](https://developer.android.com/training/data-storage/shared-preferences)
- [@video@SharedPreferences in Android](https://www.youtube.com/watch?v=rJ3uwqko9Ew)

Loading…
Cancel
Save