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

test: JUnit test (Zombie) #12

Open
wants to merge 146 commits into
base: master
Choose a base branch
from

Conversation

skwoo1110
Copy link

No description provided.

vgihan and others added 30 commits May 12, 2022 17:01
- Used to explain variable's role
- for the code readability
- Used to explain variable's role
- for the code readability
- increase readability for number
- increase readability for number
rename & replace magic number
- disconnted the menu screen creation function that was included in
GameWindow.
- separation of interests
- filename rename GameWindow to GameFrame
- filename rename Menu to MenuPanel
- divide with Model, View
- In the existing code, the size of the constructor function was large.
- By applying this refactoring, the size of the constructor was reduced and readability
was improved through the name of each function.
- By refactoring, the size of the constructor was reduced and
readability was improved through the name of each function.
separating View & Model
Plant, Peashooter, FreezePeashooter
rename, extract constant
refactor: rename variable(pea / FreezePea)
refactor: extract constant(START_X,START_Y)
refactor: extract constant(START_X,START_Y)
refactor: extract constant(START_X,START_Y)
qwer15948 and others added 30 commits June 8, 2022 21:13
	/**
	 * Purpose: test PlantFactory getInstance when it already exists.
	 * Input: PlantFactory getPlant(ID, x, y)
	 * 		ID = "Sunflower", x = 40, y = 10
	 * Expected:
	 * 		return SUCCESS
	 * 		testPlant.getCost() = Sunflower.SUNFLOWER_COST
	 * 		getX() = 40
	 * 		getY() = 10
	 */
This reverts commit d13a05c.
	/**
	 * Purpose: test PlantFactory getPlant, plant type is Sunflower
	 * Input: PlantFactory getPlant(type, x, y)
	 * 		type = "Sunflower", x = 40, y = 10
	 * Expected:
	 * 		return SUCCESS
	 * 		testPlant.getCost() = Sunflower.SUNFLOWER_COST
	 * 		getX() = 40
	 * 		getY() = 10
	 */
	/**
	 * Purpose: test PlantFactory getPlant, plant type is NormalPeashooter
	 * Input: PlantFactory getPlant(type, x, y)
	 * 		type = "NormalPeashooter", x = 40, y = 10
	 * Expected:
	 * 		return SUCCESS
	 * 		testPlant.getCost() = NormalPeashooter.SUNFLOWER_COST
	 * 		getX() = 40
	 * 		getY() = 10
	 */
	/**
	 * Purpose: test PlantFactory getPlant, plant type is FreezePeashooter
	 * Input: PlantFactory getPlant(type, x, y)
	 * 		type = "FreezePeashooter", x = 40, y = 10
	 * Expected:
	 * 		return SUCCESS
	 * 		testPlant.getCost() = FreezePeashooter.FREEZE_PEASHOOTER_COST
	 * 		getX() = 40
	 * 		getY() = 10
	 */
	/**
	 * Purpose: test plant value setting
	 * Input: NormalPeashooter(40, 10) setX(newX), setY(newY), setHealth(newHealth)
	 * 		newX = 400, newY = 100, newHealth = 123
	 * Expected:
	 * 		return SUCCESS
	 * 		getX() = 400
	 * 		getY() = 100
	 * 		getHealth() = 123
	 */
	/**
	 * Purpose: test drawing Sunflower, but graphics is null.
	 * 		--> Test before plant action runs.
	 * Input: Sunflower(10, 20)
	 * 		graphics = null
	 * Expected:
	 * 		NullPointerException
	 */
	/**
	 * Purpose: test drawing NormalPeashooter, but graphics is null.
	 * 		--> Test before plant action runs.
	 * Input: NormalPeashooter(10, 20)
	 * 		graphics = null
	 * Expected:
	 * 		NullPointerException
	 */
	/**
	 * Purpose: test drawing FreezePeashooter, but graphics is null.
	 * 		--> Test before plant action runs.
	 * Input: FreezePeashooter(10, 20)
	 * 		graphics = null
	 * Expected:
	 * 		NullPointerException
	 */
create unit-test for State, SunState, Sun Classes
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.

None yet

5 participants