dgroup / docker-unittests

Testing of base docker images during CI/CD process
MIT License
35 stars 4 forks source link

True.java:35: Use IsTrue matcher from cactoos-matchers. #181

Closed 0pdd closed 5 years ago

0pdd commented 5 years ago

The puzzle DEV-602ef409 from #DEV has to be resolved:

https://github.com/dgroup/docker-unittests/blob/1d6026641ccae85de2adb735e310b1bbed720cd4/src/main/java/com/github/dgroup/dockertest/hamcrest/True.java#L35-L35

The puzzle was created by Yurii Dubinka on 15-Dec-18.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be \"done\" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

bodax commented 5 years ago

What is the different? API same (inherited from one super-class)

dgroup commented 5 years ago

The True class should be removed, as we don't need the code duplication.

bodax commented 5 years ago

@dgroup I'm not completely sure what to do

dgroup commented 5 years ago

@bodax, please have a look into com.github.dgroup.dockertest.cmd.ArgAtTest#specified

    @Test
    public void specified() {
        MatcherAssert.assertThat(
            new ArgOf(
                "-o",
                new ListOf<>("-o", "std"),
                "Argument `-o` wasn't found"
            ).specifiedByUser(),
            new True()
        );
    }

The cactoos-matchers lib already has a class with similar functionality https://github.com/llorllale/cactoos-matchers/blob/master/src/main/java/org/llorllale/cactoos/matchers/IsTrue.java Therefore we need to remove our True and use the IsTrue in all places.

bodax commented 5 years ago

@dgroup I have a problem, on the github link cactoos-matchers consist of near 20 java files, but in IDEA, in cactoos-matcher.012.jar I had saw only near 10 java.classes. Also, IsTrue.class absent.

0pdd commented 5 years ago

The puzzle DEV-602ef409 has disappeared from the source code, that's why I closed this issue.