feat(design): add value objects — FileStatus, ArchitectureLayer, ModuleLayer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e76f0fc649
commit
d2494dda2e
|
|
@ -0,0 +1,23 @@
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class FileStatus(str, Enum):
|
||||||
|
OK = "ok"
|
||||||
|
SPARSE = "sparse"
|
||||||
|
MISSING = "missing"
|
||||||
|
TEMPLATE_RESIDUE = "template-residue"
|
||||||
|
PLACEHOLDER_HEAVY = "placeholder-heavy"
|
||||||
|
|
||||||
|
|
||||||
|
class ArchitectureLayer(str, Enum):
|
||||||
|
BUSINESS = "business"
|
||||||
|
APPLICATION = "application"
|
||||||
|
DATA = "data"
|
||||||
|
TECHNOLOGY = "technology"
|
||||||
|
|
||||||
|
|
||||||
|
class ModuleLayer(str, Enum):
|
||||||
|
DOMAIN = "domain"
|
||||||
|
APPLICATION = "application"
|
||||||
|
INFRASTRUCTURE = "infrastructure"
|
||||||
|
INTERFACES = "interfaces"
|
||||||
27
backend/tests/test_design_entities.py
Normal file
27
backend/tests/test_design_entities.py
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
from app.modules.design.domain.value_objects import (
|
||||||
|
ArchitectureLayer,
|
||||||
|
FileStatus,
|
||||||
|
ModuleLayer,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_file_status_values():
|
||||||
|
assert FileStatus.OK == "ok"
|
||||||
|
assert FileStatus.SPARSE == "sparse"
|
||||||
|
assert FileStatus.MISSING == "missing"
|
||||||
|
assert FileStatus.TEMPLATE_RESIDUE == "template-residue"
|
||||||
|
assert FileStatus.PLACEHOLDER_HEAVY == "placeholder-heavy"
|
||||||
|
|
||||||
|
|
||||||
|
def test_architecture_layer_values():
|
||||||
|
assert ArchitectureLayer.BUSINESS == "business"
|
||||||
|
assert ArchitectureLayer.APPLICATION == "application"
|
||||||
|
assert ArchitectureLayer.DATA == "data"
|
||||||
|
assert ArchitectureLayer.TECHNOLOGY == "technology"
|
||||||
|
|
||||||
|
|
||||||
|
def test_module_layer_values():
|
||||||
|
assert ModuleLayer.DOMAIN == "domain"
|
||||||
|
assert ModuleLayer.APPLICATION == "application"
|
||||||
|
assert ModuleLayer.INFRASTRUCTURE == "infrastructure"
|
||||||
|
assert ModuleLayer.INTERFACES == "interfaces"
|
||||||
Loading…
Reference in New Issue
Block a user