storage.feature¶
Info¶
- Parent directory
isshub/domain/contexts/code_repository/repositories/namespace/features/
- Last update
Last source¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | Feature: Storing namespaces
Background: Given a namespace and a namespace storage
Given a namespace with a parent namespace
And a namespace storage
Scenario: A new namespace can be saved and retrieved
When the namespace is added to the namespace storage
Then I can retrieve it
Scenario: A new namespace cannot be saved if invalid
When the namespace has some invalid content
Then I cannot add it because it's invalid
Scenario: An existing namespace cannot be added
When the namespace is added to the namespace storage
Then it's not possible to add it again
Scenario: An existing namespace can be updated
When the namespace is added to the namespace storage
And it is updated
Then I can retrieve its updated version
Scenario: An existing namespace cannot be saved if invalid
When the namespace has some invalid content
Then I cannot update it because it's invalid
Scenario: A non existing namespace cannot be updated
When the namespace is not added to the namespace storage
Then I cannot update it because it does not exist
Scenario: An existing namespace can be deleted
When the namespace is added to the namespace storage
And it is deleted
Then I cannot retrieve it
Scenario: An non existing namespace cannot be deleted
When the namespace is not added to the namespace storage
Then I cannot delete it
Scenario: All namespaces in same namespace can be retrieved at once
Given a parent namespace with no namespaces in it
And a second namespace, in the parent namespace
And a third namespace, in the parent namespace
When the namespace is added to the namespace storage
And the second namespace is added to the namespace storage
And the third namespace is added to the namespace storage
Then I can retrieve the second and the third namespaces at once
Scenario: No namespaces returned from a parent namespace without namespaces
Given a parent namespace with no namespaces in it
Then I got no namespaces for the parent namespace
Scenario: A namespace cannot be added if another exists with same name in same parent namespace
Given a second namespace with same name in the same parent namespace
When the namespace is added to the namespace storage
Then I cannot add the second one
Scenario: A namespace cannot be added if another exists with same name both without parent namespace
Given a namespace without parent namespace
And a second namespace with same name and without parent namespace
When the namespace is added to the namespace storage
Then I cannot add the second one
Scenario: A namespace cannot be updated if another exists with same new name in same parent namespace
Given a second namespace in the same parent namespace
When the namespace is added to the namespace storage
And the second namespace is added to the namespace storage
And the second namespace name is set as for the first one
Then I cannot update the second one
Scenario: A namespace cannot be updated if another exists with same new name both without parent namespace
Given a namespace without parent namespace
And a second namespace without parent namespace
When the namespace is added to the namespace storage
And the second namespace is added to the namespace storage
And the second namespace name is set as for the first one
Then I cannot update the second one
Scenario: A namespace cannot be updated if another exists with same name in new same parent namespace
Given a second namespace with the same name
When the namespace is added to the namespace storage
And the second namespace is added to the namespace storage
And the second namespace parent namespace is set as for the first one
Then I cannot update the second one
Scenario: A namespace cannot be updated if another exists with same name now both without namespace
Given a namespace without parent namespace
And a second namespace with the same name and a parent namespace
When the namespace is added to the namespace storage
And the second namespace is added to the namespace storage
And the second namespace parent namespace is cleared
Then I cannot update the second one
Scenario: A namespace can be moved from one parent namespace to another
Given a parent namespace with no namespaces in it
And a second parent namespace with no namespaces in it
When the namespace is added to the namespace storage
And the namespace is set in the first parent namespace
And I change its namespace
Then the namespace is no longer available in the original parent namespace
And the namespace is available in the new parent namespace
Scenario: A namespace without parent namespace can be moved to one
Given a namespace without parent namespace
And a parent namespace with no namespaces in it
When the namespace is added to the namespace storage
And the namespace is set in the first parent namespace
Then the namespace is no longer available when fetching namespaces without parents
And the namespace is available in the parent namespace
Scenario: A namespace with a parent namespace can have its parent namespace cleared
Given a namespace without parent namespace
And a parent namespace with no namespaces in it
When the namespace is added to the namespace storage
And the namespace is set in the parent namespace
And the namespace parent namespace is cleared
Then the namespace is no longer available in the parent namespace
And the namespace is available when fetching namespaces without parents
|
Changes¶
feat(repository): Add domain repositories¶
- Commit
- Hash
- Date
2020-10-06 17:30:45 +0200
- Type
Added
- Stats
+119 -0
@@ -0,0 +1,119 @@
+Feature: Storing namespaces
+
+ Background: Given a namespace and a namespace storage
+ Given a namespace with a parent namespace
+ And a namespace storage
+
+ Scenario: A new namespace can be saved and retrieved
+ When the namespace is added to the namespace storage
+ Then I can retrieve it
+
+ Scenario: A new namespace cannot be saved if invalid
+ When the namespace has some invalid content
+ Then I cannot add it because it's invalid
+
+ Scenario: An existing namespace cannot be added
+ When the namespace is added to the namespace storage
+ Then it's not possible to add it again
+
+ Scenario: An existing namespace can be updated
+ When the namespace is added to the namespace storage
+ And it is updated
+ Then I can retrieve its updated version
+
+ Scenario: An existing namespace cannot be saved if invalid
+ When the namespace has some invalid content
+ Then I cannot update it because it's invalid
+
+ Scenario: A non existing namespace cannot be updated
+ When the namespace is not added to the namespace storage
+ Then I cannot update it because it does not exist
+
+ Scenario: An existing namespace can be deleted
+ When the namespace is added to the namespace storage
+ And it is deleted
+ Then I cannot retrieve it
+
+ Scenario: An non existing namespace cannot be deleted
+ When the namespace is not added to the namespace storage
+ Then I cannot delete it
+
+ Scenario: All namespaces in same namespace can be retrieved at once
+ Given a parent namespace with no namespaces in it
+ And a second namespace, in the parent namespace
+ And a third namespace, in the parent namespace
+ When the namespace is added to the namespace storage
+ And the second namespace is added to the namespace storage
+ And the third namespace is added to the namespace storage
+ Then I can retrieve the second and the third namespaces at once
+
+ Scenario: No namespaces returned from a parent namespace without namespaces
+ Given a parent namespace with no namespaces in it
+ Then I got no namespaces for the parent namespace
+
+ Scenario: A namespace cannot be added if another exists with same name in same parent namespace
+ Given a second namespace with same name in the same parent namespace
+ When the namespace is added to the namespace storage
+ Then I cannot add the second one
+
+ Scenario: A namespace cannot be added if another exists with same name both without parent namespace
+ Given a namespace without parent namespace
+ And a second namespace with same name and without parent namespace
+ When the namespace is added to the namespace storage
+ Then I cannot add the second one
+
+ Scenario: A namespace cannot be updated if another exists with same new name in same parent namespace
+ Given a second namespace in the same parent namespace
+ When the namespace is added to the namespace storage
+ And the second namespace is added to the namespace storage
+ And the second namespace name is set as for the first one
+ Then I cannot update the second one
+
+ Scenario: A namespace cannot be updated if another exists with same new name both without parent namespace
+ Given a namespace without parent namespace
+ And a second namespace without parent namespace
+ When the namespace is added to the namespace storage
+ And the second namespace is added to the namespace storage
+ And the second namespace name is set as for the first one
+ Then I cannot update the second one
+
+ Scenario: A namespace cannot be updated if another exists with same name in new same parent namespace
+ Given a second namespace with the same name
+ When the namespace is added to the namespace storage
+ And the second namespace is added to the namespace storage
+ And the second namespace parent namespace is set as for the first one
+ Then I cannot update the second one
+
+ Scenario: A namespace cannot be updated if another exists with same name now both without namespace
+ Given a namespace without parent namespace
+ And a second namespace with the same name and a parent namespace
+ When the namespace is added to the namespace storage
+ And the second namespace is added to the namespace storage
+ And the second namespace parent namespace is cleared
+ Then I cannot update the second one
+
+ Scenario: A namespace can be moved from one parent namespace to another
+ Given a parent namespace with no namespaces in it
+ And a second parent namespace with no namespaces in it
+ When the namespace is added to the namespace storage
+ And the namespace is set in the first parent namespace
+ And I change its namespace
+ Then the namespace is no longer available in the original parent namespace
+ And the namespace is available in the new parent namespace
+
+ Scenario: A namespace without parent namespace can be moved to one
+ Given a namespace without parent namespace
+ And a parent namespace with no namespaces in it
+ When the namespace is added to the namespace storage
+ And the namespace is set in the first parent namespace
+ Then the namespace is no longer available when fetching namespaces without parents
+ And the namespace is available in the parent namespace
+
+ Scenario: A namespace with a parent namespace can have its parent namespace cleared
+ Given a namespace without parent namespace
+ And a parent namespace with no namespaces in it
+ When the namespace is added to the namespace storage
+ And the namespace is set in the parent namespace
+ And the namespace parent namespace is cleared
+ Then the namespace is no longer available in the parent namespace
+ And the namespace is available when fetching namespaces without parents