GithubHelp home page GithubHelp logo

Comments (4)

sockeqwe avatar sockeqwe commented on May 18, 2024

Hey,
these properties are set and managed by RecyclerView.
So you have to run that on a RecyclerView to ensure that these properties are set properly. Not sure if RecyclverView works with Robolectric (never tried).

However, what are you actually trying to test? What goal do want to achieve with that test?

from adapterdelegates.

noloman avatar noloman commented on May 18, 2024

Thanks for the fast reply!
We are UI testing the rows, basically we get the ViewHolderand check that it has properly bound the data in the row of the RecyclerView

from adapterdelegates.

sockeqwe avatar sockeqwe commented on May 18, 2024

I'm not sure if that is worth the effort.
With that said: if you need mPosition, mItemId , mItemViewType, and mOwnerRecycerView (why do you need that?)
I would try to run a RecyclerView with an adapter containing the single data item for that AdapterDelegate and then do your verifications. As said, never tried to do that with Robolectric.

from adapterdelegates.

sockeqwe avatar sockeqwe commented on May 18, 2024

Inactive

from adapterdelegates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.