Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing YamlMapDump class #40

Merged
merged 7 commits into from
Jan 29, 2017
Merged

Implementing YamlMapDump class #40

merged 7 commits into from
Jan 29, 2017

Conversation

SherifWaly
Copy link
Contributor

This PR is for #38

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.8%) to 82.353% when pulling 627a80c on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.8%) to 82.353% when pulling 4624d14 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-6.8%) to 82.353% when pulling 4624d14 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.8%) to 82.353% when pulling 107cbc7 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-6.8%) to 82.353% when pulling 107cbc7 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@SherifWaly
Copy link
Contributor Author

@amihaiemil Please check the commit, I'm not figuring out what is the problem with the coveralls check?
Also for the testing part can I add it without modifying the pom.xml file?

Copy link
Member

@amihaiemil amihaiemil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly Looks good! Just 2 minor comments. Also, please change the puzzle, so the ticket gets closed (change the parent issue number and adapt the text: "Needs 1 more implementor...")

}

@Override
YamlMapping represent() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly this should be public :D

if (super.leafProperty(key) && super.leafProperty(value)) {
mapBuilder = mapBuilder.add(key.toString(), value.toString());
} else if (super.leafProperty(key)) {
mapBuilder = mapBuilder.add(key.toString(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly Alignment here looks funny :D. Can you move key.toString() on the next line? Like this:

mapBuilder = mapBuilder.add(
    key.toString(), new YamlObjectDump(value)
);

or if the param line is longer than 80 chars, like this

mapBuilder = mapBuilder.add(
    key.toString(),
    new YamlObjectDump(value)
);

Same on the next 2

@amihaiemil
Copy link
Member

@SherifWaly the coveralls failed because the code coverage lowered. The class needs to be unit tested. You can do it, or add a puzzle for it if you already spent too much time on this :D

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling 28aab86 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling 28aab86 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@SherifWaly
Copy link
Contributor Author

@amihaiemil Please check the last commit. I have a problem with checking the YamlNode in the unit test so I left a puzzle for that :D

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling 6808f0a on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling 6808f0a on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@SherifWaly
Copy link
Contributor Author

@amihaiemil I have completed the test and removed the puzzle. Please check the code :)

Copy link
Member

@amihaiemil amihaiemil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly A few comments and we can merge this :D

* Collection<Object>). The return type or method ``represent()`` should be
* overridden with the proper subtype (e.g. YamlMapDump will have the
* method ``YamlMapping represent() {...}``
* @todo #34:30m/DEV This interface should have 1 more implementor class:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly The parent ticket here is 38 :D it also has to be updated so the bot sees it as a new puzzle.

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2016-2017, Mihai Emil Andronache
a2el * Copyright (c) 2016-2017, Mihai Emil Andronache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly Can you remove this "a2el"? :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how it was written in the code :D

* @todo #38:30m/DEV Complete unit test for YamlMapDump class.
*/
@Test
public void representsSimpleDojo() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SherifWaly the test name is not right. And can you also add a puzzle for writing more unit tests? I would like to write more test cases later :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling e3024a5 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 89.593% when pulling e3024a5 on SherifWaly:#38 into f2c0f1c on decorators-squad:master.

@SherifWaly
Copy link
Contributor Author

@amihaiemil Please check the last commit :)

@amihaiemil
Copy link
Member

@SherifWaly nice, thanks :D

@amihaiemil
Copy link
Member

@rultor merge pls

@rultor
Copy link
Collaborator

rultor commented Jan 29, 2017

@rultor merge pls

@amihaiemil OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit e3024a5 into decorators-squad:master Jan 29, 2017
@rultor
Copy link
Collaborator

rultor commented Jan 29, 2017

@rultor merge pls

@amihaiemil Done! FYI, the full log is here (took me 1min)

@SherifWaly SherifWaly deleted the #38 branch January 29, 2017 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants