Skip to content

TDD homework (With Extra Own Tests) #6

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

Open
wants to merge 10 commits into
base: HomeWork
Choose a base branch
from
Open

TDD homework (With Extra Own Tests) #6

wants to merge 10 commits into from

Conversation

daniel2IT
Copy link
Owner

1 Service

  • Crete TodoService : class and interface to test.
  • Create test project.
  • TodoService should have ability to add/edit/delete todo items.
  • Connect TodoService with InMemoryProvider.

Additional task:

  • Connect TodoService with databas context.

2 Test:

  • Can't create 2 TodoItems with same name (throw exception)
  • Can't edit 2 TodoItems with same name (throw exception)
  • TodoItem DeadlineDate must be higher then CreationDate. (throw exception)
  • TodoItem Priority must be 1...5. (throw exception if not.)

3 more fields:

  • Add new enum property to TodoItem : Status. [Backlog, Planned, Wip, Done]

  • Add new property to TodoItem : Deadline. (DateTime)

  • Add migration and data to DB.

  • Fix views to show/edit new fields.


4 tests:

then creating/editing TodoItems, we can have only 1 Wip status item with priority 1.
then creating/editing TodoItems, we can have only 3 Wip status items with priority 2.
then creating/editing TodoItems with priority 1, deadline must exist, and must be no less than week in the future.
then creating/editing TodoItems with priority 2, deadline must exist, and must be no less than 2 days in the future.
then creating/editing TodoItems with priority 1, description must exist, and must have at least 140 chars.
then deleting TodoItems it’s status can’t be ‘Planned’.


5 extra:

What extra features you can add and test?

Deleted UnExcepted Usings
- Can't create 2 TodoItems with same name (throw exception)
- Can't edit 2 TodoItems with same name (throw exception)
- TodoService should have ability to add/edit/delete todo items.
- Connect TodoService with InMemoryProvider.(I Connectet With CategoryService in this way ... For My Own learn ... :) )
then creating/editing TodoItems, we can have only 1 Wip status item with priority 1.
then editing TodoItems, we can have only 3 Wip status items with priority 2. --- Without creating
then creating TodoItems with priority 1, deadline must exist, and must be no less than week in the future
then creating TodoItems with priority 2, deadline must exist, and must be no less than 2 days in the future.
then creating TodoItems with priority 1, description must exist, and must have at least 140 chars.
  then deleting TodoItems it’s status can’t be ‘Planned’.
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.

1 participant