Skip to content

Type-casting issues with fluent interface #151

Closed

Description

@haines

The Container#self() method doesn't return the correct type for subclasses of implementations. For example, the following will not compile because withEnv returns a GenericContainer not a DockerComposeContainer:

@ClassRule
public static DockerComposeContainer environment =
    new DockerComposeContainer(new File("src/test/resources/compose-test.yml"))
            .withEnv("SOMETHING", "hello world");

Activity

  1. rnorth commented on Jan 14, 2017

    @rnorth
    Member

    @haines I think that #238 covers this issue and also includes a workaround, so I'll close this if that's OK with you?

  2. modified the milestone: 2.0 on Jan 14, 2017
  3. haines commented on Jan 14, 2017

    @haines
    ContributorAuthor

    Yep, that's fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions