<commit_before>package com.storage.mywarehouse.Entity;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

public class ProductTest {

    @Test
    public void testProductConstructor() {
        // empty constructor
        final Product product = new Product();
        assertAll(
            () -> assertEquals(0, product.getProductId()),
            () -> assertNull(product.getBrand()),
            () -> assertNull(product.getType()),
            () -> assertNull(product.getDescription()),
            () -> assertEquals(0d, product.getPrice())
        );
        product.setProductId(5);
        product.setBrand("brand");
        product.setType("type");
        product.setDescription("desc");
        product.setPrice(3.5);
        assertAll(
            () -> assertEquals(5, product.getProductId()),
            () -> assertEquals("brand", product.getBrand()),
            () -> assertEquals("type", product.getType()),
            () -> assertEquals("desc", product.getDescription()),
            () -> assertEquals(3.5, product.getPrice())
        );

        // constructor with productId, brand, type, price
        final Product product2 = new Product(55, "brand2", "type2", 66.5);
        assertAll(
                () -> assertEquals(55, product2.getProductId()),
                () -> assertEquals("brand2", product2.getBrand()),
                () -> assertEquals("type2", product2.getType()),
                () -> assertNull(product2.getDescription()),
                () -> assertEquals(66.5, product2.getPrice())
        );

        // constructor with productId, brand, type, description, price
        final Product product3 = new Product(32, "brand3", "type3", "desc3", 89.23);
        assertAll(
                () -> assertEquals(32, product3.getProductId()),
                () -> assertEquals("brand3", product3.getBrand()),
                () -> assertEquals("type3", product3.getType()),
                () -> assertEquals("desc3", product3.getDescription()),
                () -> assertEquals(89.23, product3.getPrice())
        );
    }
}<commit_msg>add product class test<commit_after>package com.storage.mywarehouse.Entity;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

public class ProductTest {

    @Test
    public void testProductConstructor() {
        // empty constructor
        final Product product = new Product();
        assertEquals(0, product.getProductId());
        assertNull(product.getBrand());
        assertNull(product.getType());
        assertNull(product.getDescription());
        assertEquals(0d, product.getPrice());
        product.setProductId(5);
        product.setBrand("brand");
        product.setType("type");
        product.setDescription("desc");
        product.setPrice(3.5);
        assertEquals(5, product.getProductId());
        assertEquals("brand", product.getBrand());
        assertEquals("type", product.getType());
        assertEquals("desc", product.getDescription());
        assertEquals(3.5, product.getPrice());

        // constructor with productId, brand, type, price
        final Product product2 = new Product(55, "brand2", "type2", 66.5);
        assertEquals(55, product2.getProductId());
        assertEquals("brand2", product2.getBrand());
        assertEquals("type2", product2.getType());
        assertNull(product2.getDescription());
        assertEquals(66.5, product2.getPrice());

        // constructor with productId, brand, type, description, price
        final Product product3 = new Product(32, "brand3", "type3", "desc3", 89.23);
        assertEquals(32, product3.getProductId());
        assertEquals("brand3", product3.getBrand());
        assertEquals("type3", product3.getType());
        assertEquals("desc3", product3.getDescription());
        assertEquals(89.23, product3.getPrice());
    }
}
{'fraction_non_alphanumeric': 0.15183380353936907, 'fraction_numerical': 0.026673506027186458, 'mean_word_length': 2.591160220994475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7658845', 'n_tokens_mistral': 1032, 'n_tokens_neox': 988, 'n_words': 191}