Linet Mutheu
Hero Squad is an application that allows users who interact with it to create heroes and squads that contain a particular number of heroes such as killing squad or intelligence squad. Heroes can be affiliated with only 1 squad at a single time, therefore if the hero was to switch to another group, their name should not be present in the previous squad that they were in.
You need to have the following installed on your machine
- Java JDK
- Gradle
- JDK
- Maven
- Java IDE (Intellij)
To access this project on your local files, you can clone it using these steps
- Open your terminal
- Use this command to clone `$ git clone /~https://github.com/MutheuLinet/Hero_Squad.git
- This will clone the repository into your local folder
- Navigate to the folder you cloned into, within src/main/java/App. java and open it with intellij.
- Go to your browser and type localhost:4567
You may also want to contribute to enhance a functionality:
- Fork the repository to your GitHub account
- Create a new branch (git switch -c ft-development)
- Make the changes you intend
- Add changes to reflect the changes made
- Commit your changes (git commit -m 'additional info')
- Push to the branch (git push origin ft-develop)
- Create a Pull Request.
The user is able to;
- Run the App on a browser
- Select the Add Hero or Squad tab which will open a form to fill in the data
- View the Hero or Squad details.
- Add more squads and Heroes as possible (It also allows a user to Test the output before actual running of the App)
-
Navigate to the folder you cloned into, within src/test/java/models and open it with intellij. Select the HeroTests or SquadTests.
-
This is a sample test to check a correct instance of the Hero object.
@Test
public void all_hasAllProperties_true() {
Hero hero = new Hero ("BatMan", "40", "flying", "water");
assertEquals(true, hero instanceof Hero);
}
- Right click within the open test file and run the tests on your terminal.
- HTML
- CSS
- Handlebars
- Java
- Gradle
- Spark
- Junit
This project is under the MIT licence
Copyright (c) 2022 Linet Mutheu