Skip to content

modify ToCamelCase mehtod to support PascalCase strings#8

Open
JNeisa wants to merge 2 commits intorhythmagency:v2/mainfrom
JNeisa:fix-camel-case
Open

modify ToCamelCase mehtod to support PascalCase strings#8
JNeisa wants to merge 2 commits intorhythmagency:v2/mainfrom
JNeisa:fix-camel-case

Conversation

@JNeisa
Copy link

@JNeisa JNeisa commented May 30, 2023

fix for #7 issue

Copy link
Contributor

@Nicholas-Westby Nicholas-Westby left a comment

Choose a reason for hiding this comment

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

Just one change regarding the tests. See inline comment.

public void PascalCase()
[DataRow("hello-world-test", "helloWorldTest")]
[DataRow("HelloWorldTest", "helloWorldTest")]
public void CamelCase(string input, string expected)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you've removed the PascalCase test method, which should not have happened. If anything, you can add the CamelCase method while leaving the PascalCase method untouched. Also, I recommend adding a data row for a single letter to ensure it doesn't throw an error (since I see there is new logic that concatenates the first letter followed by everything else).

Copy link
Author

Choose a reason for hiding this comment

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

Sure! It is done right now, please take a look

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.

2 participants