Last active
          October 27, 2025 23:19 
        
      - 
      
- 
        Save jdmedeiros/c008e08a9de9efac38cf4f4f2aca19b5 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* =========================== | |
| Testes para northwind.Region | |
| =========================== */ | |
| /* 1️⃣ Inserir APENAS o nome em português (gera tradução automática para inglês) */ | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ptnome) | |
| VALUES (110, 'Color test 1', 'Verde'); | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ptnome) | |
| VALUES (111, 'Color test 2', 'Anil'); | |
| /* 2️⃣ Inserir APENAS o nome em inglês (gera tradução automática para português) */ | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ennome) | |
| VALUES (112, 'Color test 3', 'Blue'); | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ennome) | |
| VALUES (113, 'Color test 4', 'Indigo'); | |
| /* 3️⃣ Inserir AMBOS corretos (não deve alterar nada) */ | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ptnome, ennome) | |
| VALUES (114, 'Color test 5', 'Vermelho', 'Red'); | |
| /* 4️⃣ Inserir inválido (deve dar erro controlado) */ | |
| INSERT INTO northwind.Region (RegionID, RegionDescription, ptnome) | |
| VALUES (115, 'Color test 6', 'Castanho'); -- ❌ inválido | |
| /* 5️⃣ Atualizar APENAS PT → deve gerar tradução automática EN */ | |
| UPDATE northwind.Region | |
| SET ptnome = 'Amarelo', ennome = NULL | |
| WHERE RegionID = 110; | |
| /* 6️⃣ Atualizar APENAS EN → deve gerar tradução automática PT */ | |
| UPDATE northwind.Region | |
| SET ennome = 'Orange', ptnome = NULL | |
| WHERE RegionID = 111; | |
| /* 7️⃣ Atualizar AMBOS corretos → não deve alterar nada */ | |
| UPDATE northwind.Region | |
| SET ptnome = 'Azul', ennome = 'Blue' | |
| WHERE RegionID = 112; | |
| /* 8️⃣ Atualizar inválido → deve dar erro */ | |
| UPDATE northwind.Region | |
| SET ptnome = 'CorInexistente', ennome = NULL | |
| WHERE RegionID = 113; | |
| /* 9️⃣ Verificar resultados */ | |
| SELECT RegionID, RegionDescription, ptnome, ennome | |
| FROM northwind.Region | |
| ORDER BY RegionID; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment