<?php

namespace Tests\Feature;
use App\Models\PerhitunganModel;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class Perhitungan extends TestCase
{
    public function testDataNilai()
    {
         $id_alternatif = 1;
         $id_kriteria = 1;
         $result = PerhitunganModel::data_nilai($id_alternatif, $id_kriteria);
         $this->assertNotNull($result);
         $this->assertEquals($id_alternatif, $result->id_alternatif);
         $this->assertEquals($id_kriteria, $result->id_kriteria);
    }

    /**
     * Test deleting hasil.
     *
     * @return void
     */
    public function testHapusHasil()
    {
        $result = PerhitunganModel::hapus_hasil();
        $this->assertTrue($result);
    }

    /**
     * Test getting hasil.
     *
     * @return void
     */
    public function testGetHasil()
    {
        $hasil = PerhitunganModel::get_hasil();
        $this->assertNotNull($hasil);
    }
}
