Comments (16)
Would i be interested?
No not just interested. I would <3 to have this in. This has been on my todo list forever.
Your strategy of starting with just one example sounds perfect. Would really appreciate it.
from rxjava-android-samples.
great :) Writing tests is my favourite part in programming :)
I have written a first test as an example but received this message when pushing:
"remote: Permission to kaushikgopal/RxJava-Android-Samples.git denied to EGecius."
I guess I need granting a permission by you.
from rxjava-android-samples.
by the way, I am a huge fan of your podcasts. Thank so much for making them, and especially for making them lively and fun too :) love your sense of playfulness on it :)
from rxjava-android-samples.
Thanks for the kind words EGecius! do appreciate it.
hmm.. that's interesting. you should open up a pull request with github. you might be trying to push directly to the repo. let me know if you're still facing issues.
from rxjava-android-samples.
I have a separate branch called 'first_test' but can't push it. I get the following message:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/first_test:refs/heads/first_test
Pushing to https://github.com/kaushikgopal/RxJava-Android-Samples.git
remote: Permission to kaushikgopal/RxJava-Android-Samples.git denied to EGecius.
fatal: unable to access 'https://github.com/kaushikgopal/RxJava-Android-Samples.git/': The requested URL returned error: 403
Completed with errors, see above
from rxjava-android-samples.
I have no problems pushing to my own repositories. I think I remember last time I had a similar problem, the owner of the repository added me as a contributor and I had no problems after it.
from rxjava-android-samples.
Pushing to https://github.com/kaushikgopal/RxJava-Android-Samples.git
So that message indicates that you're trying to push directly to the repo
without a PR (Pull request). If you take a look at github's instructions
here http://goog_1513273970
https://guides.github.com/activities/contributing-to-open-source/ (see the
Pull Request section), that should definitely work.
Other people have contributed to this same repo without any permission
changes, so there shouldn't technically be a problem with permissions.
I would need to add you as a contributor only if the project was private.
Open source public projects don't have that restriction.
Kaushik
On Wed, Jan 27, 2016 at 8:35 AM, Egidijus Gecius [email protected]
wrote:
I have no problems pushing to my own repositories. I think I remember last
time I had a similar problem, the owner of the repository added me as a
contributor and I had no problems after it.—
Reply to this email directly or view it on GitHub
#38 (comment)
.
from rxjava-android-samples.
my apologies. I had not forked the project. It makes total sense now :)
PR created
from rxjava-android-samples.
feel free to make suggestions how to organise code, packages, etc.. I do have strong preferences as long as I can easily write tests, which is my favourite part.
from rxjava-android-samples.
That will be good to include some unit testing. What about refactoring as EGecius said ? Then like he did in the last pull request, what can be done is :
Either moving the rx observables out of the activities to some helpers and keep the subscribers or moving all to a second layer (Presenter for ex.) and return only emitted data to the view.
from rxjava-android-samples.
I think keeping the subscriber in the fragments is fine. If you move the subscribers into the helper it's self then it becomes harder to inject the TestSubscriber
. Making the Observable s side effect free and returning all the transformed data to the view should work pretty well.
from rxjava-android-samples.
the test look awesome and is definitely in the right direction imho.
Either moving the rx observables out of the activities to some helpers and keep the subscribers or moving all to a second layer (Presenter for ex.) and return only emitted data to the view.
if this was a full blown project that recommendation would definitely be the way i would like to go. that being said, the whole point of this project is to help folks quickly understand how to use an observable. i don't have a great feeling burying the most important parts of the code with more abstraction using helpers/presenters etc.
it does make it a tad bit tricky though, since enabling the writing of tests requires some re-jiggering of the code (thanks Android!).
Maybe just making ConcurrencyWithSchedulersHelper
as an internal class of the fragment might just do it ¯_(ツ)_/¯
i definitely want to explore more less-intrusive ways of adding tests without changing the code.
from rxjava-android-samples.
Yes absolutely. internal Helpers classes are more than enough for test purpose.
from rxjava-android-samples.
I wonder if you can use the RxJavaPlugins.getInstance().registerObservableExecutionHook
to inject a test subscriber.
from rxjava-android-samples.
yup, was thinking along the same lines. I implemented something similar in another repo here:
https://github.com/kaushikgopal/rem/blob/master/app/src/test/java/co/kaush/rem/ui/list/TaskListControllerTest.java#L42
from rxjava-android-samples.
heya, was doing some cleanup. my bad for letting this go unattended, for so long.
if you still feel strongly about this PR, chime in. if we mutually agree it's something that needs to go into the repo, we'll have to work towards rebasing the changes again over the latest master.
✌️
from rxjava-android-samples.
Related Issues (20)
- Observables Context?? HOT 1
- Rxjava 2 with Android new architecture components HOT 2
- Exceeds Dex Limit of 64k in its current state. HOT 1
- [Question] Help Needed HOT 1
- gc overhead limit exceeded?
- Mocking framework
- memory leak
- Wrapping an Android Method that requires return value
- Code of Examples
- After value change -> execute once HOT 5
- What does RotationPersist1WorkerFragment and RotationPersist2WorkerFragment do? HOT 1
- networkObserver get Exception so the final result is onError in your example when network fail even if localObeserver has data HOT 3
- Port to RxJava 2.0 HOT 12
- RxJava2: Create an examples handing backpressure HOT 2
- takeUntil optimized cache and network method and Gson parse model HOT 2
- RxJava 1 branch HOT 1
- Have you stopped maintaining this project? HOT 2
- GUI elements must not be accessed from non-main threads HOT 1
- You are using a private api (as of support library v25 and up) HOT 1
- Retrolambda is too difficult for beginners HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxjava-android-samples.