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
A new executor, and a renewed executor #195
Conversation
This #KICK Executor simply use to kick player. 1) kick sender - Not giving any argument #KICK 2) kick sender with custom kick message - giving only one argument #KICK "You are kicked" 3) kick specific player - giving only one argument #KICK player("Pro_Snape") 4) kick specific player with custom kick message - giving two arguments #KICK player("Pro_Snape") "You are kicked lmao" Tested.
This commit makes #CLEARCHAT able to accept Player instance. **1)** Clear specific player's chat #CLEARCHAT player("Pro_Snape")
The executors are looking good!
|
Sorry about the close-reopen, that was an accident |
print error if there are more than two arguments.
add validation check when args's length is more than 2.
Fixed what you're recommended. Hope these Executors work perfect. |
@rkdrns4747 Do you also mind to write test cases for this PR? You can reference link Actually, you will edit AbstractTestExecutors.java and write test codes just like the other few examples in it. If you are able to do that, I would have no problem adding you to Collaborator. Also, briefly learn about how 'git' works too! it will help you a lot. |
same as title.
same as title.
just knew eq() and anyString() don't work, also some elses.
some error fixed. Mokito -> Mockito
same as last commit, Mokito -> Mockito
@rkdrns4747 Please also be advised that we use 4 spaces instead of tab for indentation. |
@wysohn |
@rkdrns4747 right click on it then you can run the test in your local machine (the run button will say something like 'run test blah blah') it will throw error in there ECMAException is usually caused directly by running javascript, so make sure that your assertError() are well implemented. |
@wyshon |
What version of jdk are you using? It should be 1.8 though |
yea I'm using jdk1.8. and also project sdk is jdk 1.8 |
maybe directly right click on the java file instead of folder we need to know what that ECMAException is caused by |
@wysohn kk. I'll try that after my school ended. |
final one
same as title.
ahh, now I know how Mockito works. thanks for help @wysohn! |
same as title
same as title
@wysohn this is what I got. |
When you’re using assertError, the error should be pre-computed to minimize any suprises Also, when you test for equality in your JavaScript, make sure to use |
@gerzytet ohh, that's why I don't feel good when I make new Executor, PlaceHolder. Thanks for reminding :) also, I'll fix them a few hours later. |
same as title.
fix == to ===.
There must be a way in Intellij to test it locally At least you can build it with gradle then it will throw errors in console as messages We can't do much but assume that ECMAExeption is indeed thrown by the KICK executor itself, but we never know the details. At least the code seems to be working, but maybe the message part of asserError() is not exactly matching with the one in the test cases. |
Apparently, that's a new error If ParserException is thrown, I assume you have some syntax error in the CLEARCHAT executor It's not related to the test |
@wysohn oh kk, I'll check it thx |
Looks good to me! Great work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve already kinda reviewed it, but ok
- There are some stray == in clearchat
- you forgot to prefix some JS variables with var (recommended for scope reasons)
- eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
same as title.
same as title.
@rkdrns4747 |
Moved done, due to being published in ver2.2.1 |
1. New executor, #KICK
This #KICK Executor is simply used to kick player.
1) kick sender - Not giving any argument
2) kick sender with custom kick message - giving only one argument
3) kick specific player - giving only one argument
4) kick specific player with custom kick message - giving two arguments
2. Made #CLEARCHAT to accept Player instance as arg.
This makes #CLEARCHAT able to accept Player instance.
1) Clear specific player's chat