Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* This PR introduces new Proto Classes which will be used to implement Platform Parameter project in Oppia-Android. This PR will is reffered as PR-1.1 in the Milestones * Lint check correction * Removing unnecessary spaces * Changed the name of Parameter class to PlatformParameter and included the oneof type field in ParameterWithName * Changed the names of all the other classes to include PlatformParameter in their name * nit space change * Reverting back to previous structure * Suggested changes by Ben about spacing, renaming, docs and removing PlatformParameterMap * Modifying BUILD.bazel to include platform_parameter.proto * Changed the visibility in BUILD.bazel * removed unnecessary visibility in BUILD.bazel * Nit indentation change * Suggested changes to remove the PlatformParameterWithName message and use only one PlatformParameter message everywhere * Added a Singleton and Generic Interface to help with Providing Platform Parameters * Added PlatformParameterSingletonTest and tweaked PlatformParameterSingleton * Added new tests and tweaked the documentation to include KDBlocks * Adding the dependency over PlatformParameter Proto Classes * Using a default setter for platformParameterMap, and changed the tests to have a constant mockPlatformParameterMap instead of creating it again. Also changed the KDocs for generic interface * Lint checks * Renaming variables and changing KDocs * Replaced the use of generic getter function to three separate functions for String/Int/Boolean type parameters. Also updated the tests accordingly * Modified test cases to include check for double initialization of platformParameterMap and also to check that singleton returns null in case the wrong type of Parameter is asked * Nit spacing changes * using assertThat().isNotEqualTo() in place of current assert statements also correct lint checks * Lint check * Rearrange imports with ktlint * KDoc changes, Renamed generic Interface to PlatformParameterValue and used PlatformParameter.newBuilder() instead of getDefaultInstance in the mockPlatformParameterMap * Bazel changes for including PlatformParameter in the KDoc of PlatformParameterValue Interface * Nit fix to prevent type inference warning * Reverted auto generated changes * Changed all the KDoc Format as suggested * Changed the approach to have an PlatformParameterSingleton interface and its Impl. Also changed the tests accordingly * Nit spacing changes * Using mutableMap instead for PlatformParameterMap in Singleton
- Loading branch information