<?php

/**
 * PriceListTest
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  FattureInCloud
 * @author   Fatture In Cloud API team
 * @link     https://fattureincloud.it
 */

/**
 * Fatture in Cloud API v2 - API Reference
 *
 * Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy.   The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
 *
 * The version of the OpenAPI document: 2.1.5
 * Contact: info@fattureincloud.it
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.12.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Please update the test case below to test the model.
 */

namespace FattureInCloud\Test\Model;

use FattureInCloud\ObjectSerializer;
use PHPUnit\Framework\TestCase;

/**
 * PriceListTest Class Doc Comment
 *
 * @category    Class
 * @description PriceList
 * @package     FattureInCloud
 * @author   Fatture In Cloud API team
 * @link     https://fattureincloud.it
 */
class PriceListTest extends TestCase
{
    public $array = [];
    public $object;
    /**
     * Setup before running any test case
     */
    public static function setUpBeforeClass(): void
    {
    }

    /**
     * Setup before running each test case
     */
    public function setUp(): void
    {
        $json = '{
          "id": "10",
          "name": "listino",
          "prices_type": "net",
          "is_default": true,
          "valid_from": "2025-01-01",
          "valid_to": "2025-12-01",
          "type": "sell"
        }';

        $this->array = json_decode($json, true);

        $this->object = ObjectSerializer::deserialize($json, '\FattureInCloud\Model\PriceList');
    }

    /**
     * Clean up after running each test case
     */
    public function tearDown(): void
    {
    }

    /**
     * Clean up after running all test cases
     */
    public static function tearDownAfterClass(): void
    {
    }

    /**
     * Test "PriceList"
     */
    public function testPriceList()
    {
        foreach ($this->array as $key => $value) {
            Testcase::assertArrayHasKey($key, $this->object);
        }
    }

    /**
     * Test attribute "id"
     */
    public function testPropertyId()
    {
        TestCase::assertEquals($this->object['id'], $this->array['id']);
    }

    /**
     * Test attribute "name"
     */
    public function testPropertyName()
    {
        TestCase::assertEquals($this->object['name'], $this->array['name']);
    }

    /**
     * Test attribute "prices_type"
     */
    public function testPropertyPricesType()
    {
        TestCase::assertEquals($this->object['prices_type'], $this->array['prices_type']);
    }

    /**
     * Test attribute "is_default"
     */
    public function testPropertyIsDefault()
    {
        TestCase::assertEquals($this->object['is_default'], $this->array['is_default']);
    }

    /**
     * Test attribute "valid_from"
     */
    public function testPropertyValidFrom()
    {
        TestCase::assertEquals($this->object['valid_from'], $this->array['valid_from']);
    }

    /**
     * Test attribute "valid_to"
     */
    public function testPropertyValidTo()
    {
        TestCase::assertEquals($this->object['valid_to'], $this->array['valid_to']);
    }

    /**
     * Test attribute "type"
     */
    public function testPropertyType()
    {
        TestCase::assertEquals($this->object['type'], $this->array['type']);
    }
}
