fssa-batch3 / fssa-batch3/sec_a_logesh.venkatesan__corejava_project_2
Post module | Create Post Feature
- Dominant language
- Java
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Creating Post Process
## User Story
As a social media user, I need to have the capability to create new posts on the platform. If a post with the same content already exists in the platform's records, the system should show an error message indicating that the post already exists.
## Task
1. Implement Data Access Object (DAO) Layer.
2. Implement Service Layer.
3. Create JUnit Test Cases.
4. Ensure that the test cases are passing.
5. Write clear and concise comments in the code to explain complex logic.
## DAO
- `createPost()`: Records a new post in the platform's database.
## Service
- `addPost()`: Manages the addition of a new post using the Service Layer.
## JUnit Tests
- `testValidAddPost()`: Tests the successful addition of a post.
- `testInvalidAddPost()`: Tests the handling of adding a post that already exists.
## Estimation
8 hours
## Flowchart
```mermaid
graph TD
Start --> UserInitiatesPostCreation
UserInitiatesPostCreation --> CheckExistingPost
CheckExistingPost -->|Existing Post Found| NotifyExistingPost
CheckExistingPost -->|No Existing Post| CreateNewPost
NotifyExistingPost --> EndExistingPost
CreateNewPost -->|Success| NotifyPostSuccess
CreateNewPost -->|Failure| NotifyPostFailure
NotifyPostSuccess --> EndSuccess
NotifyPostFailure --> EndFailure
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.