-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EPIC] Tests refactoring #4063
Comments
Datasources classesWhen they are not like that, we should move the datasources implementations to a package called OCLocalAppRegistryDataSource:
OCRemoteAppRegistryDataSource:
OCLocalAuthenticationDataSource:
OCLocalCapabilitiesDataSource:
OCRemoteCapabilitiesDataSource:
OCLocalFileDataSource:
OCRemoteFileDataSource:
OCFolderBackupLocalDataSource:
OCRemoteOAuthDataSource:
OCSharedPreferencesProvider:
OCRemoteServerInfoDataSource:
OCRemoteShareeDataSource:
OCLocalShareDataSource:
OCRemoteShareDataSource:
OCLocalSpacesDataSource:
OCRemoteSpacesDataSource:
ScopedStorageProvider:
OCLocalTransferDataSource:
OCLocalUserDataSource:
OCRemoteUserDataSource:
OCRemoteWebFingerDatasource:
|
Repository classesWhen they are not like that, we should move the repository implementations to a package called OCAppRegistryRepository:
OCAuthenticationRepository:
OCCapabilityRepository:
OCFileRepository:
OCFolderBackupRepository:
OCOAuthRepository:
OCServerInfoRepository:
OCShareeRepository:
OCShareRepository:
OCSpacesRepository:
OCTransferRepository:
OCUserRepository:
OCWebFingerRepository:
|
Current status of tests in ownCloud Android app
We're in the process of refactoring some of the tests or the way we test in the app. We have 2 types of tests in code: unit tests and UI tests.
Unit tests
We want to create unit tests for classes that on the one hand check that their methods return the expected result and on the other hand verify that their methods call the corresponding inner methods:
owncloudData
module:Things to discuss
Answer:
authentication.datasources.implementation
is instrumentedAnswer: it needs the context, so we need the test to be instrumented to get it
providers
?Answer: yes, they will be moved
UI tests
👷🏼♂️ (We'll discuss about this and update this section...)
Things to discuss
testSomethingReturnsFoo
orsomething - ok - returns foo
Answer: for the moment, we decided to follow the convention:
{name of the method} returns {foo} when {conditions or environment}
Answer: if they just make a mock throw an exception, without the method being tested catching it and doing something with it, they are not necessary since we're not testing real code
Related issues
The text was updated successfully, but these errors were encountered: