Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
test: Inclui testes para a entidade Produto
Browse files Browse the repository at this point in the history
  • Loading branch information
dannevesdantas committed Dec 8, 2023
1 parent 887d8d1 commit b5ece3e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/domain/entities/produto.entity.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { CategoriaEntity } from './categoria.entity';
import { ProdutoEntity } from './produto.entity';

describe('Produto Entity', () => {
it('Deve ser criado com letras maiusculas o nome e a descrição de uma entidade produto', async () => {
const categoriaEntity = new CategoriaEntity(
'Lanche',
'Lanche x tudo',
'0a14aa4e-75e7-405f-8301-81f60646c93d',
);

const produtoEntity = new ProdutoEntity(
'produto X',
categoriaEntity,
5.0,
'http://',
'teste produto x',
'0a14aa4e-75e7-405f-8301-81f60646c93d',
);

expect(produtoEntity.nome).toBe('Produto X');
expect(produtoEntity.descricao).toBe('Teste Produto X');
});
});

0 comments on commit b5ece3e

Please sign in to comment.