You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/05/05 05:39:49 UTC

[GitHub] [shardingsphere] terrymanu opened a new issue #5425: Avoid using junit with example

terrymanu opened a new issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] taojintianxia edited a comment on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
taojintianxia edited a comment on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624439210


   Understand. I also do agree with the idea of ​​**make every example independent from others**, Jun. But in my understanding, even in this case, junit is not the best assert scenarios way.if you wanna demonstrate the process , maybe BDD is better.
   you could assert the scenarios by `GIVEN` `WHEN` `THEN` keyword even in your mother language or English as following :
   
   ```
   Scenario: Account has sufficient funds
   Given the account balance is $100
   And the card is valid
   And the machine contains enough money  
   When the Account Holder requests $20
   Then the ATM should dispense $20
   And the account balance should be $80
   And the card should be returned
   ```
   But I personally prefer the example invoke by clear code structure through main method as the entrance.after all this example is for newbie, the more **stupid** the example is , the easier it can start with . please make this module more **stupid**, so the greenhorn like me coud easliy to understand. :smiley:
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] cherrylzhao commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624441647


   thanks a lot, BDD is a good idea


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] taojintianxia edited a comment on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
taojintianxia edited a comment on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624398869


   what's the original intention of **using junit instead of main** ?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624082045


   Welcome


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] taojintianxia commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624398869


   what's the original intention of **usding junit instead of main** ?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] cherrylzhao commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624412616


   original intention is have a try to simplify the example structure, make every example independent from others, provide assert scenarios to let user know whether transaction works or not. If we just write a main, it is very confuse what have happened just through the print out logs.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] taojintianxia commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
taojintianxia commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624439210


   Understand. I also do agree with the idea of ​​**make every example independent from others**, Jun. But in my understanding, even in this case, junit is not the best assert scenarios way.if you wanna demonstrate the process , maybe BDD is better.
   you could assert the scenarios by `GIVEN` `WHEN` `THEN` keyword even in your mother language or English as following :
   
   ```
   Scenario: Account has sufficient funds
   Given the account balance is $100
   And the card is valid
   And the machine contains enough money  
   When the Account Holder requests $20
   Then the ATM should dispense $20
   And the account balance should be $80
   And the card should be returned
   ```
   But I personally prefer the example invoke by clear code structure through main method as the entrance.after all this example is for newbie, the more **stupid** the example is , the easier it can start with :smiley:
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TaoZhiMLND commented on issue #5425: Avoid using JUnit on example

Posted by GitBox <gi...@apache.org>.
TaoZhiMLND commented on issue #5425:
URL: https://github.com/apache/shardingsphere/issues/5425#issuecomment-624074146


   I want to support this issue. It is related on the issue #5302 which I focus on.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org