Files
larry 575deedaa2
Continuous Integration / Quality Assurance (push) Canceled after 0s
shared: implementazione package identity
2026-08-06 17:01:45 +02:00

44 lines
773 B
Python

"""
Tests for the RequestId Value Object.
"""
from __future__ import annotations
from shared.identity import Identifier, RequestId
def test_new_creates_module_id() -> None:
"""A new RequestId should be created."""
# Arrange
# Act
module_id = RequestId.new()
# Assert
assert isinstance(module_id, RequestId)
def test_module_id_is_identifier() -> None:
"""RequestId should inherit from Identifier."""
# Arrange
# Act
module_id = RequestId.new()
# Assert
assert isinstance(module_id, Identifier)
def test_module_id_preserves_type() -> None:
"""Factory methods should preserve the concrete type."""
# Arrange
# Act
module_id = RequestId.new()
# Assert
assert type(module_id) is RequestId