-
Notifications
You must be signed in to change notification settings - Fork 5
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
13 define entity seniormanageraccess #18
Conversation
Hello @Koufan-De-King please add a description to these pull request and fix the failling test |
// Constructor | ||
public SeniorManagerAccess(String name, AccessStatus status) { | ||
this.name = name; | ||
this.status = status.ACTIVE; | ||
} |
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.
You're trying to access the ACTIVE value in the wrong way.
In your constructor, you're passing status as a parameter, and then you use status.ACTIVE. This confuses Java, because it thinks you're trying to get ACTIVE from the status parameter, which doesn't make sense.
The Fix:
Instead of using status.ACTIVE, you should directly use the enum name AccessStatus.ACTIVE to get the ACTIVE value.
The constructor sets this.status to AccessStatus.ACTIVE regardless of the input.
Correction: Change the constructor to accept the status parameter.(this.status=status
)
|
||
// Getters and Setters | ||
//... |
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.
PLease remove these comment, it's not needed
/* | ||
* Copyright (c) 2018-2023 adorsys GmbH and Co. KG | ||
* All rights are reserved. | ||
*/ | ||
|
||
package de.adorsys.ledgers.baam.db.domain; | ||
|
||
import org.junit.jupiter.api.Test; | ||
class SeniorManagerAccessTest { | ||
|
||
@Test | ||
void createManagerRole() { | ||
} | ||
|
||
@Test | ||
void modifyManagerRole() { | ||
} | ||
|
||
@Test | ||
void revokeManagerRole() { | ||
} | ||
|
||
@Test | ||
void suspendAccess() { | ||
} | ||
|
||
@Test | ||
void activateAccess() { | ||
} | ||
} |
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.
Hello @Koufan-De-King please implememt the various test cases ..
Also since the seniormanageraccess is an entity, it needs to be included into the ledgers DB..
to verify, executed docker compose up
on the ledgers root directory to see..
} | ||
|
||
// Default constructor for JPA | ||
public SeniorManagerAccess() {} |
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.
perfect...
doing these will make more sense:
public SeniorManagerAccess() {
this.status = AccessStatus.ACTIVE; // Set default status
}```
/* | ||
* Copyright (c) 2018-2023 adorsys GmbH and Co. KG | ||
* All rights are reserved. | ||
*/ | ||
|
||
package de.adorsys.ledgers.baam.db.domain; | ||
|
||
import org.junit.jupiter.api.Test; | ||
class SeniorManagerAccessTest { | ||
|
||
@Test | ||
void createManagerRole() { | ||
} | ||
|
||
@Test | ||
void modifyManagerRole() { | ||
} | ||
|
||
@Test | ||
void revokeManagerRole() { | ||
} | ||
|
||
@Test | ||
void suspendAccess() { | ||
} | ||
|
||
@Test | ||
void activateAccess() { | ||
} |
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.
PLease right a full test for these entity..
use you can use an h2 database which acts as an in memory DB for the test..
these is to ensure that the entire logic is working perfectly fine and everything is actually stored in a database.
Also please ensure to do a git pull so as to see recent changes, these will help you see the new recent project structure for our module.
Continued here |
Created
and wrote a basic test using JUnit.