Skip to content

feat: add hip hop artist classes and corresponding tests #512

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

Merged
merged 4 commits into from
Apr 23, 2025

Conversation

bryanasb251
Copy link
Contributor

@bryanasb251 bryanasb251 commented Apr 11, 2025

Chat gpt for exception and break down.

@@ -0,0 +1,36 @@
package com.codedifferently.lesson16.hiphopArtistTest;
Copy link
Contributor

Choose a reason for hiding this comment

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

These are not the appropriate tests (and they are in the wrong package). You only really need one test file for HipHopArtist and should create proper tests using the "Arrange, Act, Assert" pattern.

Replace all of these tests with the correct one for HipHopArtist and that will straighten things out.

public class DMXtest {
@Test
public void testDMX() {
DMX.main(new String[0]); // Call the main method of DMX class
Copy link
Contributor

Choose a reason for hiding this comment

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

Test methods must have at least one assertion.

import java.util.ArrayList;

public class DMX {
public static void main(String[] args) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't have added any new main methods since there's already one that I've set up. What you should have actually done is made a HipHopArtistTest class in the test project and use test methods to create instances of HipHopArtist objects like you're doing here and then assert that the object methods work correctly.

@bryanasb251
Copy link
Contributor Author

Removed unnecessary classes and add hiphopArtistTest

Signed-off-by: Anthony D. Mays <anthony@morganlatimer.com>
Signed-off-by: Anthony D. Mays <anthony@morganlatimer.com>
@anthonydmays anthonydmays merged commit 642bad6 into code-differently:main Apr 23, 2025
1 check passed
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