Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
412 commits
Select commit Hold shift + click to select a range
410998a
add: AddStateToProjectUiController and enhance UseCase for better err…
mohamedshemees May 1, 2025
68c989a
add failing tests for LogsCsvRepository
Mostafa-Ibrahim96 May 1, 2025
4e4f865
implement logic for LogsCsvRepository to pass tests
Mostafa-Ibrahim96 May 1, 2025
bd576d3
Merge branch 'develop' into feature/edit-task-title
ahmedNaser7 May 1, 2025
67e0497
add: AddStateToProjectUiController and enhance UseCase for better err…
mohamedshemees May 1, 2025
73bcc90
Merge remote-tracking branch 'origin/data-layer' into feature/add-sta…
mohamedshemees May 1, 2025
297b5e8
refactor: Clean up coverage limit configuration in build.gradle.kts
mohamedshemees May 1, 2025
ae9938f
refactor test case to delete (every) that use mockk(relax=true)
NadaMansour20 May 1, 2025
e50060f
add failing tests for AuthenticationCsvRepository
Mostafa-Ibrahim96 May 1, 2025
9e549fa
implement logic for AuthenticationCsvRepository to pass tests
Mostafa-Ibrahim96 May 1, 2025
56399fb
update edit title of task in use case and test and add dependency in …
ahmedNaser7 May 1, 2025
4c6fb28
Merge branch 'develop' into feature/auth
ahmedNaser7 May 1, 2025
1a8c122
Add AddMateToProjectUiController to handle adding mates to projects
Mostafa-Ibrahim96 May 1, 2025
c31e435
Merge branch 'develop' into feature/get-task-use-case
Mostafa-Ibrahim96 May 1, 2025
e368ce1
add GetTaskUiController to handle retrieving tasks by ID
Mostafa-Ibrahim96 May 1, 2025
6445eb7
add admin user access to GetAllTasksOfProjectUseCase and update tests
MohamedElsewedy May 1, 2025
b315e43
add GetAllTasksOfProjectController
MohamedElsewedy May 1, 2025
d5ec663
update auth use cases and add ui controller
ahmedNaser7 May 1, 2025
6f5b0bb
Merge branch 'refs/heads/develop' into feature/get-project-history
NadaMansour20 May 1, 2025
f23b546
Merge remote-tracking branch 'refs/remotes/origin/data-layer' into fe…
mohamedshemees May 1, 2025
e3d51d4
Merge branch 'refs/heads/develop' into feature/get-task-history
mohamedshemees May 1, 2025
84c6d89
add edit title task ui
ahmedNaser7 May 1, 2025
708095c
update ui of auth
ahmedNaser7 May 1, 2025
40ae874
add: implement GetTaskHistoryUseCase and associated UI components
mohamedshemees May 1, 2025
e71096d
add AddMateToTaskController
MohamedElsewedy May 1, 2025
997213f
update ui of Edit title of task
ahmedNaser7 May 1, 2025
26d29b9
Merge branch 'develop' into feature/create-task
mohamedshemees May 1, 2025
9101175
update AddMateToTaskUseCaseTest and AddMateToTaskUseCase
MohamedElsewedy May 1, 2025
d6d9ad4
add GetTaskUiController in App
Mostafa-Ibrahim96 May 1, 2025
6f36577
add AddMateToProjectUiController in App
Mostafa-Ibrahim96 May 1, 2025
8df7f8e
refactor GetTaskUiController in App
Mostafa-Ibrahim96 May 1, 2025
4c63442
add GetAllTasksOfProjectController to menu items
MohamedElsewedy May 1, 2025
7555c41
add GetProjectHistoryUiController and added to App class
NadaMansour20 May 1, 2025
287cef3
update auth test and logic and ui
ahmedNaser7 May 1, 2025
c6d1ece
add: implement CreateTask feature with UI controller and use case
mohamedshemees May 1, 2025
df82b76
Merge branch 'refs/heads/develop' into feature/create-project
NadaMansour20 May 1, 2025
a4b27e5
add: update menu to include CreateTaskUiController for task creation
mohamedshemees May 1, 2025
153b3d9
fix: Throw FileNotFoundException if file does not exist in EditableCs…
abdo-essam May 1, 2025
af5e040
add CreateProjectUiController and added to App class
NadaMansour20 May 1, 2025
eb677e5
fix: Improve error handling in LogsCsvStorage by using IllegalArgumen…
abdo-essam May 1, 2025
85107cc
add DeleteMateFromTaskUiController
NadaMansour20 May 1, 2025
73b4b61
refactor GetProjectHistoryUiController to use itemsViewer to view pro…
NadaMansour20 May 1, 2025
dee06e3
refactor: Improve test method naming for clarity in AddStateToProject…
mohamedshemees May 1, 2025
4c349b6
refactor GetProjectUiController enhancement
NadaMansour20 May 1, 2025
12fc9e4
refactor DeleteMateFromTaskUiController enhancement
NadaMansour20 May 1, 2025
befc0df
refactor GetAllTasksOfProjectUseCase and GetAllTasksOfProjectTest
MohamedElsewedy May 1, 2025
6bdc0a3
add validateInputs in UiController instead of use case
Mostafa-Ibrahim96 May 1, 2025
1e269e5
add validateInputs in UiController instead of use case
Mostafa-Ibrahim96 May 1, 2025
144e0b0
refactor AddMateToTaskUseCase & test & UI
MohamedElsewedy May 1, 2025
43ae6c8
Update build.gradle.kts
mohamedshemees May 1, 2025
7bd4dd5
return app ui as default and edit controller
ahmedNaser7 May 1, 2025
4e02ed5
add validation input
ahmedNaser7 May 1, 2025
2a33ef6
Merge branch 'data-layer' into add-repository-impl
Mostafa-Ibrahim96 May 1, 2025
9767a63
Create test-coverage.yml
mohamedshemees May 1, 2025
f7ef02d
add edit project states TTD
AsmaaAttua May 1, 2025
7049db5
update gradle
Mostafa-Ibrahim96 May 1, 2025
5843210
Merge pull request #14 from Vienna-Squad/add-repository-impl
Mostafa-Ibrahim96 May 1, 2025
492e1f9
Merge branch 'develop' into feature/add-mate-to-task
MohamedElsewedy May 1, 2025
3e8aa7c
Merge branch 'develop' into feature/get-project-tasks
MohamedElsewedy May 1, 2025
7dadd4e
Merge branch 'refs/heads/develop' into feature/create-project
NadaMansour20 May 1, 2025
67ddb7c
Merge branch 'refs/heads/develop' into feature/delete-mate-from-task
NadaMansour20 May 1, 2025
7185f44
add validateInputs in UiController instead of use case
Mostafa-Ibrahim96 May 1, 2025
5b38145
Merge branch 'develop' into feature/get-task-use-case
Mostafa-Ibrahim96 May 1, 2025
95b80ac
Merge branch 'develop' into feature/auth
ahmedNaser7 May 1, 2025
b3eb57e
refactor test to coverage
Mostafa-Ibrahim96 May 1, 2025
903a342
add edit project states controller TDD
AsmaaAttua May 1, 2025
e9946cf
add validation in DeleteMateFromTaskUiController
NadaMansour20 May 1, 2025
ecfe831
Merge branch 'refs/heads/develop' into feature/get-project-history
NadaMansour20 May 1, 2025
e9bb271
add validation in GetProjectHistoryUiController
NadaMansour20 May 1, 2025
d4f5a39
add creatorId validation in CreateProjectUiController
NadaMansour20 May 1, 2025
6ad4059
return app as default
ahmedNaser7 May 1, 2025
193af31
fix exceptions in testes
AsmaaAttua May 1, 2025
aeb94ce
update test and use case of register
ahmedNaser7 May 1, 2025
48f6b23
refactor: Enhance AddStateToProjectUseCase with improved error handli…
mohamedshemees May 2, 2025
6f4833f
update login use case
ahmedNaser7 May 2, 2025
1a6a6b9
Merge remote-tracking branch 'origin/develop' into feature/add-state-…
mohamedshemees May 2, 2025
48cb1b0
update validation of input in auth ui
ahmedNaser7 May 2, 2025
b79dd9b
add edit task state TDD
AsmaaAttua May 2, 2025
3321bb0
fix should throw exception when updating task with same state
AsmaaAttua May 2, 2025
b06aba2
fix should throw exception when updating task with same state
AsmaaAttua May 2, 2025
c722d2d
Merge branch 'develop' into feature/create-task
mohamedshemees May 2, 2025
15ea3dc
refactor: enhance CreateTaskUseCase with project validation and error…
mohamedshemees May 2, 2025
8623e41
Merge remote-tracking branch 'origin/feature/add-mate-to-project-usec…
mohamedshemees May 2, 2025
c2d5197
Merge remote-tracking branch 'origin/feature/add-mate-to-task' into t…
mohamedshemees May 2, 2025
056cc69
Merge remote-tracking branch 'origin/feature/add-state-to-project' in…
mohamedshemees May 2, 2025
ca927b3
Merge remote-tracking branch 'refs/remotes/origin/feature/auth' into …
mohamedshemees May 2, 2025
052eef5
Merge remote-tracking branch 'refs/remotes/origin/feature/create-proj…
mohamedshemees May 2, 2025
cf7dda8
Merge remote-tracking branch 'refs/remotes/origin/feature/create-task…
mohamedshemees May 2, 2025
172dd20
Merge remote-tracking branch 'refs/remotes/origin/feature/delete-mate…
mohamedshemees May 2, 2025
84fa421
Merge remote-tracking branch 'refs/remotes/origin/feature/delete-mate…
mohamedshemees May 2, 2025
d2571a4
Merge remote-tracking branch 'refs/remotes/origin/feature/delete-proj…
mohamedshemees May 2, 2025
c2a0c21
Merge remote-tracking branch 'refs/remotes/origin/feature/edit-projec…
mohamedshemees May 2, 2025
11d1113
Merge remote-tracking branch 'refs/remotes/origin/feature/edit-task-t…
mohamedshemees May 2, 2025
72bc448
Merge remote-tracking branch 'refs/remotes/origin/feature/get-project…
mohamedshemees May 2, 2025
8c0804e
Merge remote-tracking branch 'refs/remotes/origin/feature/get-project…
mohamedshemees May 2, 2025
ee1c13a
Merge remote-tracking branch 'refs/remotes/origin/feature/get-task-hi…
mohamedshemees May 2, 2025
df9edfb
Merge remote-tracking branch 'refs/remotes/origin/feature/get-task-us…
mohamedshemees May 2, 2025
42e1acc
add login and logout function in AuthenticationCsvRepository and add …
Mostafa-Ibrahim96 May 2, 2025
992aaa7
Merge pull request #27 from Vienna-Squad/add-repository-impl
Mostafa-Ibrahim96 May 2, 2025
15bf88d
Merge branch 'develop' of https://github.com/Vienna-Squad/PlanMateApp…
ahmedNaser7 May 2, 2025
8f242d0
edit AuthenticationRepository to override
Mostafa-Ibrahim96 May 2, 2025
75570bc
Merge pull request #28 from Vienna-Squad/add-repository-impl
Mostafa-Ibrahim96 May 2, 2025
d4f0928
Merge branch 'develop' into feature/auth
ahmedNaser7 May 2, 2025
8105dac
refactor: rename AddMateToTaskController to AddMateToTaskUIController…
mohamedshemees May 2, 2025
4257a2c
update auth use case and ui
ahmedNaser7 May 2, 2025
8f2b8a4
Merge remote-tracking branch 'refs/remotes/origin/feature/auth' into …
mohamedshemees May 2, 2025
927ad0f
feat: implement CSV storage and repository modules for user, project,…
mohamedshemees May 2, 2025
4194cce
Merge branch 'refs/heads/develop' into feature/edit-project-states
NadaMansour20 May 2, 2025
e3a9fd7
feat: implement CSV storage and repository modules for user, project,…
mohamedshemees May 2, 2025
ba0ade9
Merge remote-tracking branch 'origin/feature/edit-project-name' into …
mohamedshemees May 2, 2025
c349aac
add EditProjectStateUiController and update EditProjectStatesUseCaseTest
NadaMansour20 May 2, 2025
47fc221
Merge branch 'app-demo' of https://github.com/Vienna-Squad/PlanMateAp…
abdo-essam May 2, 2025
1402fb4
Merge remote-tracking branch 'origin/feature/edit-project-states' int…
NadaMansour20 May 2, 2025
8283782
Merge remote-tracking branch 'origin/feature/edit-project-states' int…
abdo-essam May 2, 2025
aecf3a6
refactor: streamline error handling and improve UI controller impleme…
mohamedshemees May 2, 2025
9128c78
Merge branch 'app-demo' of https://github.com/Vienna-Squad/PlanMateAp…
abdo-essam May 2, 2025
6730049
fix: remove error messages from exceptions in use cases and tests for…
abdo-essam May 2, 2025
0462f6d
test: Add LogoutUseCaseTest to verify logout functionality and handle…
abdo-essam May 2, 2025
8289b69
Merge branch 'app-demo' of https://github.com/Vienna-Squad/PlanMateAp…
abdo-essam May 2, 2025
4db3131
refactor: Remove unused imports and update SDK path in local.properties
abdo-essam May 2, 2025
fa88114
feat: Implement DeleteTaskUseCase and add corresponding unit tests
abdo-essam May 2, 2025
de2a67d
edit the usecases exceptions
mohannadahmed00 May 2, 2025
3b2c50c
Merge remote-tracking branch 'origin/app-demo' into app-demo
mohannadahmed00 May 2, 2025
69ed0a5
Merge branch 'feature/edit-project-states' of https://github.com/Vien…
abdo-essam May 2, 2025
0392d06
Merge remote-tracking branch 'origin/app-demo' into app-demo
abdo-essam May 2, 2025
9c32f45
test: enhance DeleteTaskUseCaseTest with comprehensive authorization …
abdo-essam May 2, 2025
7cc0e66
test: remove redundant test for unchanged task state in EditTaskState…
abdo-essam May 2, 2025
a28d5db
refactor function login in AuthenticationCsvRepository
Mostafa-Ibrahim96 May 2, 2025
f15a2d9
Merge pull request #29 from Vienna-Squad/add-repository-impl
Mostafa-Ibrahim96 May 2, 2025
3e2f81c
refactor: update repository interfaces and implementations to use (UU…
mohamedshemees May 2, 2025
2661e8e
feat: implement DeleteStateFromProject functionality with authorizati…
abdo-essam May 2, 2025
030e5e4
refactor: update repository interfaces and implementations to use (UU…
mohamedshemees May 2, 2025
b911c8c
Merge remote-tracking branch 'origin/app-demo' into app-demo
mohamedshemees May 2, 2025
741e690
refactor auth logic
ahmedNaser7 May 3, 2025
008aee9
refactor: enhance error handling by providing detailed messages for e…
mohamedshemees May 3, 2025
cfabb87
Merge remote-tracking branch 'origin/app-demo' into app-demo
mohamedshemees May 3, 2025
4c1e996
Updated multiple use cases and UI controllers: AddMateToProjectUseCas…
Mostafa-Ibrahim96 May 3, 2025
68dce24
Merge remote-tracking branch 'origin/app-demo' into app-demo
Mostafa-Ibrahim96 May 3, 2025
20e0a55
Merge remote-tracking branch 'origin/app-demo' into app-demo
mohamedshemees May 3, 2025
921ab18
refactor: enhance error handling by providing detailed messages for e…
mohamedshemees May 3, 2025
aa8726a
refactor: enhance error handling by providing detailed messages for e…
mohamedshemees May 3, 2025
ccab56c
refactor tests to use uuid instead of string
Mostafa-Ibrahim96 May 3, 2025
1941dd8
Merge remote-tracking branch 'origin/app-demo' into app-demo
Mostafa-Ibrahim96 May 3, 2025
99dba6e
feat: improve printSwimlanes function with project availability check…
abdo-essam May 3, 2025
21e2811
refactor: simplify run method by removing printui parameter and redun…
mohamedshemees May 3, 2025
cf0d68a
Merge remote-tracking branch 'origin/app-demo' into app-demo
mohamedshemees May 3, 2025
51bef06
refactor project tests
ahmedNaser7 May 3, 2025
4162194
feat: implement DeleteTaskUseCase and add logging functionality
mohamedshemees May 3, 2025
9874164
feat: implement DeleteTaskUseCase and add logging functionality
mohamedshemees May 3, 2025
ec28bf7
edit usecases to be more simple
mohannadahmed00 May 4, 2025
6163a39
implement result handling in all ui controllers
mohannadahmed00 May 4, 2025
33427a9
handle exceptions without Result class
mohannadahmed00 May 5, 2025
196d8fa
update unit test of auth and edit title task
ahmedNaser7 May 5, 2025
e32c237
add local & remote data sources
mohannadahmed00 May 5, 2025
2792ff1
delete CSV files to ignore it
mohannadahmed00 May 5, 2025
caeb444
implemegent the LocalDataSource.kt
mohannadahmed00 May 5, 2025
e1648a3
solve the issue of di with the new datasources interfaces
mohannadahmed00 May 5, 2025
bf3dbce
feat: migrate data storage to MongoDB with new repository implementat…
abdo-essam May 5, 2025
847dfac
feat: update LoginUseCase and MongoStorage to improve user handling a…
abdo-essam May 5, 2025
cac20fc
Merge branch 'refactor-v07' of https://github.com/Vienna-Squad/PlanMa…
abdo-essam May 5, 2025
3eccf13
feat: add createAdminUser function for admin user setup
abdo-essam May 5, 2025
e0abd01
enhance: project management by integrating user authentication and lo…
mohamedshemees May 6, 2025
c00abb6
implement the named di with all repos and its data sources
mohannadahmed00 May 6, 2025
42b3373
Merge remote-tracking branch 'origin/refactor-v08' into refactor-v07
mohannadahmed00 May 6, 2025
a1f65e4
edit repos to be just data provider and move the logic to usecases
mohannadahmed00 May 6, 2025
2726daa
edit repos to be just data provider and move the logic to usecases
mohannadahmed00 May 6, 2025
c17a91f
add the logger to all usecases
mohannadahmed00 May 6, 2025
5a6133c
add dummies to test utils
mohannadahmed00 May 6, 2025
1558c8e
change private variables in TestUtils.kt into public
mohannadahmed00 May 6, 2025
71de5fd
solve UUID issue of dummies in TestUtils.kt
mohannadahmed00 May 6, 2025
f18d5f7
add the test cases of DeleteMateFromProjectUseCase and handle it
mohannadahmed00 May 6, 2025
55acf29
add the test cases of DeleteProjectUseCase and handle it
mohannadahmed00 May 6, 2025
cf23f19
add the test cases of DeleteStateFromProjectUseCase and handle it
mohannadahmed00 May 6, 2025
35ac2eb
add the test cases of EditProjectNameUseCase and handle it
mohannadahmed00 May 6, 2025
3237dc2
delete EditProjectStatesUseCaseTest
mohannadahmed00 May 6, 2025
1cb1efc
add NoChangeException in domain exceptions
mohannadahmed00 May 6, 2025
b00a449
handle the accessibility of mate getProjectById
mohannadahmed00 May 7, 2025
eda519c
delete the duplication of thrown NotFoundException
mohannadahmed00 May 7, 2025
5fc5e80
update project repo module
ahmedNaser7 May 7, 2025
b288f58
add test cases for auth and edit task title and add mate to project a…
ahmedNaser7 May 7, 2025
faf860d
add dummyTasks to TestUtils.kt
mohannadahmed00 May 7, 2025
bf02d7c
add test cases to GetAllProjectsUseCase and handle it
mohannadahmed00 May 7, 2025
0395be4
add test cases of af add mate to task and create project and create t…
ahmedNaser7 May 7, 2025
6ba72ce
edit all repos to take just one data source
mohannadahmed00 May 7, 2025
d8b7e73
Merge branch 'refactor' into test/test-1
mohannadahmed00 May 7, 2025
3fba0d1
Merge branch 'refactor' into test/test-2
ahmedNaser7 May 7, 2025
e2b394d
add: unit tests for task management use cases
mohamedshemees May 7, 2025
3173977
feat: add unit tests for MongoDB storage implementations of logs, pro…
abdo-essam May 7, 2025
bb96a78
add test cases to GetAllTasksOfProjectUseCase and handle it
mohannadahmed00 May 8, 2025
fbd2c1b
add test cases to GetProjectHistoryUseCase and handle it
mohannadahmed00 May 8, 2025
246d830
add users repo to use cases to get the current user while logging
mohannadahmed00 May 8, 2025
998294d
add SafeExecutor to make the safe call functions testable
mohannadahmed00 May 8, 2025
f32bebf
Merge branch 'refactor' into test/test-1
mohannadahmed00 May 8, 2025
b960f16
Merge branch 'refactor' into test/test-3
mohamedshemees May 8, 2025
06985d6
Merge branch 'refactor' into test/test-2
ahmedNaser7 May 8, 2025
0216f55
fix SafeExecutor di issue
mohannadahmed00 May 8, 2025
7371874
Merge branch 'refactor' into test/test-2
ahmedNaser7 May 8, 2025
db2b691
Merge branch 'refactor' into test/test-1
mohannadahmed00 May 8, 2025
1cd6923
test: enhance DeleteMateFromTaskUseCaseTest with user logging and exc…
mohamedshemees May 8, 2025
35711cd
test: update DeleteTaskUseCaseTest to use dummy tasks and improve log…
mohamedshemees May 8, 2025
a2cdb4c
test: enhance EditTaskStateUseCaseTest with user repository integrati…
mohamedshemees May 8, 2025
489b200
test: improve GetTaskHistoryUseCaseTest with clearer log assertions a…
mohamedshemees May 8, 2025
ca7ddac
test: simplify GetTaskUseCaseTest by using a single dummy task instance
mohamedshemees May 8, 2025
215acc0
update unit tests after refactor aurh call and add the safeExecutor
ahmedNaser7 May 8, 2025
ec46149
add test cases to LogsRepository and handle it
mohannadahmed00 May 8, 2025
5131a9d
Merge pull request #33 from Vienna-Squad/test/test-1
mohannadahmed00 May 8, 2025
1c1d3f3
Merge pull request #32 from Vienna-Squad/test/data-storage-mango
mohannadahmed00 May 8, 2025
7884301
Merge branch 'refactor' into test/test-2
mohannadahmed00 May 8, 2025
9c458e2
Merge pull request #30 from Vienna-Squad/test/test-2
mohannadahmed00 May 8, 2025
10c60c7
Merge branch 'refactor' into test/test-3
mohannadahmed00 May 8, 2025
7df4d95
Merge pull request #31 from Vienna-Squad/test/test-3
mohannadahmed00 May 8, 2025
8e6a154
refactor: update entity ids to be uuid instead of string
mohannadahmed00 May 9, 2025
ceeb402
refactor: implement access for adding and deleting mates and states i…
mohannadahmed00 May 9, 2025
c614077
refactor: replace CsvPreferences with UserPreferences and update pref…
mohannadahmed00 May 9, 2025
247e1f9
Merge pull request #36 from Vienna-Squad/code-review-notes
mohannadahmed00 May 9, 2025
995d47a
refactor: rename package structure from common.di to di for improved …
mohannadahmed00 May 9, 2025
efcae87
Update test-coverage.yml
mohamedshemees May 9, 2025
f18d0ba
Merge pull request #35 from Vienna-Squad/refactor
mohannadahmed00 May 9, 2025
e3cf7c2
refactor: simplify DeleteMateFromProjectUseCase and enhance test cove…
mohannadahmed00 May 10, 2025
78001b7
refactor: simplify DeleteProjectUseCase and enhance test coverage for…
mohannadahmed00 May 10, 2025
6203130
refactor: simplify DeleteStateFromProjectUseCase and enhance test cov…
mohannadahmed00 May 10, 2025
f4e6600
refactor: simplify EditProjectNameUseCase and enhance test coverage f…
mohannadahmed00 May 10, 2025
6139780
refactor: simplify GetAllProjectsUseCase and enhance test coverage fo…
mohannadahmed00 May 10, 2025
b34da01
refactor: enhance GetAllTasksOfProjectUseCase with access control and…
mohannadahmed00 May 10, 2025
0f374a1
refactor: enhance GetProjectHistoryUseCase with access control and im…
mohannadahmed00 May 10, 2025
dc279fc
Merge branch 'main' into develop
mohannadahmed00 May 10, 2025
4fff763
test: enhance GetTaskUseCaseTest with additional failure scenarios an…
mohamedshemees May 10, 2025
6ffd5c6
refactor: improve test coverage for edge cases to CreateProjectUseCase
mohannadahmed00 May 10, 2025
4659e21
refactor: enhance AddMateToTaskUseCaseTest with access control checks…
mohannadahmed00 May 10, 2025
9ac7cc8
Merge remote-tracking branch 'origin/test/test-usecases' into test/te…
mohannadahmed00 May 10, 2025
871ff8f
update auth tests and edit CreateUserUseCase
ahmedNaser7 May 10, 2025
3dbd81b
update test cases of add mate and state to project
ahmedNaser7 May 10, 2025
2bdccd3
update test cases of edit title of task
ahmedNaser7 May 10, 2025
ebf7c4f
add dummy task and dummyProjectId and dummyMateId and dummyState
ahmedNaser7 May 10, 2025
3a0770c
Merge pull request #38 from Vienna-Squad/test/update-test-utils
ahmedNaser7 May 10, 2025
cffbbd0
Merge pull request #39 from Vienna-Squad/test/auth-use-case
ahmedNaser7 May 10, 2025
b4d8932
Merge pull request #40 from Vienna-Squad/test/add-mate-and-add-state-…
ahmedNaser7 May 10, 2025
6490d81
Merge pull request #41 from Vienna-Squad/test/edit-task-title
ahmedNaser7 May 10, 2025
45f447a
Merge branch 'test/test-usecases' into develop
mohannadahmed00 May 10, 2025
d44bce2
test: enhance DeleteTaskUseCaseTest with additional scenarios and err…
mohamedshemees May 10, 2025
b6f7f3c
Merge remote-tracking branch 'origin/test/tasks-test-cases' into develop
mohannadahmed00 May 10, 2025
4283eda
update condition of edit task title use case and update test cases
ahmedNaser7 May 10, 2025
18a4441
Merge pull request #42 from Vienna-Squad/test/edit-task-title
ahmedNaser7 May 10, 2025
f5ca8be
Merge remote-tracking branch 'origin/develop' into develop
mohannadahmed00 May 10, 2025
ffded17
test: enhance DeleteMateFromTaskUseCaseTest with additional scenarios…
mohamedshemees May 10, 2025
221c279
Merge remote-tracking branch 'origin/test/tasks-test-cases' into develop
mohannadahmed00 May 10, 2025
b58ce90
test: enhance CreateTaskUseCaseTest with additional scenarios and err…
mohamedshemees May 10, 2025
0b70809
Merge remote-tracking branch 'origin/test/tasks-test-cases' into develop
mohannadahmed00 May 10, 2025
95f2405
test: enhance EditTaskStateUseCaseTest with additional scenarios and …
mohamedshemees May 10, 2025
c8fc1dd
Merge remote-tracking branch 'origin/test/tasks-test-cases' into develop
mohannadahmed00 May 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore keys.properties
run: echo "$KEYS_FILE" | base64 -d > keys.properties
env:
KEYS_FILE: ${{ secrets.KEYS_FILE }}

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gradle
build/
.idea
.csv
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/bauild/
!**/src/test/**/build/
Expand All @@ -16,7 +17,8 @@ build/
out/
!**/src/main/**/out/
!**/src/test/**/out/

keys.properties
local.properties
### Kotlin ###
.kotlin

Expand Down
126 changes: 122 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,113 @@
import org.gradle.declarative.dsl.schema.FqName.Empty.packageName
import java.io.FileInputStream
import java.util.*

plugins {
kotlin("jvm") version "2.1.20"
kotlin("jvm") version "2.1.0"
id("com.github.gmazzo.buildconfig") version "4.1.2"
jacoco
}
val localProperties = Properties().apply {
val localFile = rootProject.file("Keys.properties")
if (localFile.exists()) {
FileInputStream(localFile).use { load(it) }
}
}
val mongoUri = localProperties.getProperty("MONGO.URI")
val databaseName = localProperties.getProperty("DATABASE.NAME")

buildConfig {
packageName("org.example")
buildConfigField("String", "MONGO_URI", "\"${mongoUri}\"")
buildConfigField("String", "DATABASE_NAME", "\"${databaseName}\"")
buildConfigField("String", "APP_VERSION", "\"${project.version}\"")
}
jacoco {
toolVersion = "0.8.7"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
exclude("**/test/**") // Excludes all test packages
// or be more specific
// exclude("com/example/mypackage/test/**")
}
fun findTestedProductionClasses(): List<String> {
val testFiles = fileTree("src/test/kotlin") {
include("**/*Test.kt")
}.files
return testFiles.map { file ->
val relativePath = file.relativeTo(file("src/test/kotlin")).path
.removeSuffix("Test.kt")
.replace("\\", "/")
"**/${relativePath}.class"
}
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
val includedClasses = findTestedProductionClasses()
classDirectories.setFrom(
fileTree("$buildDir/classes/kotlin/main") {
include(includedClasses)
}
)
sourceDirectories.setFrom(files("src/main/kotlin"))
doFirst {
println("=== INCLUDED PRODUCTION CLASSES ===")
includedClasses.forEach {
println(it)
}
}
reports {
html.required.set(true)
xml.required.set(true)
}
}
tasks.jacocoTestCoverageVerification {
dependsOn(tasks.jacocoTestReport)

// Use the same includedClasses for verification as in the report
val includedClasses = findTestedProductionClasses()

classDirectories.setFrom(
fileTree("$buildDir/classes/kotlin/main") {
include(includedClasses)
}
)
violationRules {
rule {
// Generic instruction coverage (default counter)
limit {
minimum = "0.8".toBigDecimal()
}

limit {
counter = "LINE"
value = "COVEREDRATIO"
minimum = "0.8".toBigDecimal()
}

limit {
counter = "METHOD"
value = "COVEREDRATIO"
minimum = "0.8".toBigDecimal()
}
limit {
counter = "CLASS"
value = "COVEREDRATIO"
minimum = "0.8".toBigDecimal()
}
}
}
}
tasks.check {
dependsOn(tasks.jacocoTestCoverageVerification)
}

group = "org.example"
Expand All @@ -11,11 +119,21 @@ repositories {

dependencies {
testImplementation(kotlin("test"))
implementation("io.insert-koin:koin-core:4.0.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("io.mockk:mockk:1.13.10")
testImplementation("com.google.truth:truth:1.4.2")
// MongoDB driver
implementation("org.mongodb:mongodb-driver-sync:4.9.1")

// Kotlin serialization for MongoDB (optional but helpful)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
}

tasks.test {
useJUnitPlatform()
testLogging {
events ("passed", "skipped", "failed")
showStandardStreams = true
}
}
kotlin {
jvmToolchain(17)
}
8 changes: 8 additions & 0 deletions local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri May 02 18:44:35 EEST 2025
sdk.dir=C\:\\Users\\20180\\AppData\\Local\\Android\\Sdk
51 changes: 50 additions & 1 deletion src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
package org.example

import com.mongodb.client.model.Filters
import di.appModule
import di.useCasesModule
import org.bson.Document
import org.example.di.dataModule
import org.example.di.repositoryModule
import data.datasource.mongo.MongoConfig
import org.example.common.Constants.MongoCollections.USERS_COLLECTION
import org.example.data.repository.UsersRepositoryImpl
import org.example.domain.entity.User
import org.example.presentation.AuthApp
import org.koin.core.context.GlobalContext.startKoin
import java.time.LocalDateTime
import java.util.UUID

fun main() {
println("Hello, PlanMate!")
}
startKoin { modules(appModule, useCasesModule, repositoryModule, dataModule) }
createAdminUser()
AuthApp().run()
}

fun createAdminUser() {
println("Creating admin user...")
try {
val collection = MongoConfig.database.getCollection(USERS_COLLECTION)

// Check if admin1 already exists
val existingAdmin = collection.find(Filters.eq("username", "mohannad")).first()
if (existingAdmin != null) {
println("Admin user already exists")
return
}

// Create a new admin user with string UUID
val adminId = UUID.randomUUID()
val adminDoc = Document()
.append("_id", adminId.toString())
.append("username", "mohannad")
.append("hashedPassword", UsersRepositoryImpl.encryptPassword("12345678"))
.append("role", User.UserRole.ADMIN.name)
.append("createdAt", LocalDateTime.now().toString())

collection.insertOne(adminDoc)
println("Created admin user: admin / 12345678")

} catch (e: Exception) {
println("Error creating admin: ${e.message}")
e.printStackTrace()
}
}

37 changes: 37 additions & 0 deletions src/main/kotlin/common/Constants.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.example.common

object Constants {
object APPS {
const val AUTH_APP = "AUTH_APP"
const val ADMIN_APP = "ADMIN_APP"
const val MATE_APP = "MATE_APP"
}

object Files {
const val PREFERENCES_FILE_NAME = "preferences.csv"
const val LOGS_FILE_NAME = "logs.csv"
const val PROJECTS_FILE_NAME = "projects.csv"
const val TASKS_FILE_NAME = "tasks.csv"
const val USERS_FILE_NAME = "users.csv"
}

object PreferenceKeys {
const val CURRENT_USER_ID = "CURRENT_USER_ID"
const val CURRENT_USER_NAME = "CURRENT_USER_NAME"
const val CURRENT_USER_ROLE = "CURRENT_USER_ROLE"
}

object MongoCollections {
const val LOGS_COLLECTION = "LOGS_COLLECTION"
const val TASKS_COLLECTION = "TASKS_COLLECTION"
const val PROJECTS_COLLECTION = "PROJECTS_COLLECTION"
const val USERS_COLLECTION = "USERS_COLLECTION"
}

object NamedDataSources {
const val LOGS_DATA_SOURCE = "LOGS_DATA_SOURCE"
const val TASKS_DATA_SOURCE = "TASKS_DATA_SOURCE"
const val PROJECTS_DATA_SOURCE = "PROJECTS_DATA_SOURCE"
const val USERS_DATA_SOURCE = "USERS_DATA_SOURCE"
}
}
11 changes: 11 additions & 0 deletions src/main/kotlin/data/datasource/DataSource.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package data.datasource

import java.util.UUID

interface DataSource<T> {
fun getAll(): List<T>
fun getById(id: UUID): T
fun add(newItem: T)
fun delete(item: T)
fun update(updatedItem: T)
}
45 changes: 45 additions & 0 deletions src/main/kotlin/data/datasource/csv/CsvStorage.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package data.datasource.csv

import data.datasource.DataSource
import java.io.File
import java.io.FileNotFoundException

abstract class CsvStorage<T>(val file: File) : DataSource<T> {
abstract fun toCsvRow(item: T): String
abstract fun fromCsvRow(fields: List<String>): T

override fun getAll(): List<T> {
if (!file.exists()) throw FileNotFoundException()
val lines = file.readLines()

if (lines.isEmpty() || lines[0] != getHeaderString().trim()) {
throw IllegalArgumentException("Invalid CSV format: missing or incorrect header")
}

return lines.drop(1) // Skip header
.filter { it.isNotEmpty() }
.map { row -> fromCsvRow(row.split(",")) }
}

override fun add(newItem: T) {
if (!file.exists()) {
file.createNewFile()
file.writeText(getHeaderString())
}
file.appendText(toCsvRow(newItem))
}

fun write(items: List<T>) {
if (!file.exists()) {
file.createNewFile()
file.writeText(getHeaderString())
}
val str = StringBuilder()
items.forEach {
str.append(toCsvRow(it))
}
file.writeText(str.toString())
}

protected abstract fun getHeaderString(): String
}
Loading
Loading