Code Monkey home page Code Monkey logo

Comments (9)

kluever avatar kluever commented on May 22, 2024 3

Semi-related is (internal) bug 18722931 where I asked Colin to "polish up PathSubject and put it somewhere common".

from truth.

jgustie avatar jgustie commented on May 22, 2024 3

+1 on resolving the ambiguity; it took me a while to realize Path is an Iterable<Path> and a Comparable<Path>.

from truth.

sebhoss avatar sebhoss commented on May 22, 2024

+1 for the PathSubject. Currently the following does not compile due to method ambiguity:

    @Test
    public void shouldConvertToPath() throws IOException {
        // given
        final Path expectedPath = ...;

        // when
        final Path convertedPath = ...;

        // then
        ASSERT.that(convertedPath).isEqualTo(expectedPath);
    }

Declaring convertedPath as Object resolves the ambiguity. It's fine in this case since i'm treating convertedPath as an Object anyway, but having a specialized PathSubject sure would be nice!

from truth.

basil avatar basil commented on May 22, 2024

+1, just hit the same issue.

from truth.

cgruber avatar cgruber commented on May 22, 2024

Hey @cgdecker - this would be a good thing. Let's sync about how I can help you get it moved in. I'd really like to see this in for 1.0.

from truth.

cgdecker avatar cgdecker commented on May 22, 2024

To be honest, I've lost track of this and would have to dig up what I'd done again. I don't think it was ready or that we'd even worked out the API issues really. And I don't think I really have time to work on it this quarter. If you do want to try to push on getting this in, I can probably find what I had in terms of API plan and/or implementation and you can try to take it from there though.

from truth.

alexkleiman avatar alexkleiman commented on May 22, 2024

+1, I just hit this issue as well

from truth.

dimo414 avatar dimo414 commented on May 22, 2024

See #285 for PathSubject; I'd like to see that added, even just as a stub.

from truth.

nick-someone avatar nick-someone commented on May 22, 2024

PathSubject exists as part of the Truth8 extension now, mostly to resolve the ambiguity of IterableSubject and ComparableSubject:

public static PathSubject assertThat(@NullableDecl Path target) {

Leaving this open to decide how to do more assertions on the Path object.

from truth.

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.