from src.models.usuarios import Usuario
from src.models.empresas import Empresa
from src.models.computadores import Computer


class TestComputerModel:
    """Test Computer model validation."""

    def test_computer_creation(self):
        """Test creating a Computer instance."""
        computer = Computer(
            empresa_id="test-id",
            nome_host="SRV-01",
            nome_usuario="admin",
            numero_serie="ABC123",
            sistema_operacional="Windows 11",
            ram_instalada=16384,
        )

        assert computer.empresa_id == "test-id"
        assert computer.nome_host == "SRV-01"
        assert computer.sistema_operacional == "Windows 11"

    def test_computer_timestamps(self):
        """Test Computer timestamps."""
        computer = Computer(
            empresa_id="test-id",
            nome_host="SRV-01",
        )

        assert computer.nome_host == "SRV-01"


class TestUsuarioModel:
    """Test Usuario model validation."""

    def test_usuario_creation(self):
        """Test creating a Usuario instance."""
        usuario = Usuario(
            nome="Test User"
        )

        assert usuario.nome == "Test User"


class TestEmpresaModel:
    """Test Empresa model validation."""

    def test_empresa_creation(self):
        """Test creating an Empresa instance."""
        empresa = Empresa(
            nomeFantasia="Test Company",
            razaoSocial="Test Company LTDA",
            cnpj="12.345.678/0001-90",
        )

        assert empresa.nomeFantasia == "Test Company"
        assert empresa.cnpj == "12.345.678/0001-90"
