Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates *

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Invoice;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
*
* @author katra
*/
public class InvoiceTest {
public InvoiceTest(){
}
@BeforeAll
public static void setUpClass(){
}
@AfterAll
public static void tearDownClass(){
}
@BeforeEach
public void setUp(){
}
@AfterEach
public void tearDown(){
}
/**
* Test of getInvoiceTotal method, of class Invoice.
*/
@Test
public void testGetInvoiceTotal(){
System.out.println("getInvoiceTotal");
Invoice instance = null;
double expResult =0.0;
double result = instance.getInvoiceTotal();
assertEquals(expResult, result, 0.0);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}The InvoiceTest class should contain a main method so the JVM can run it. In the main method, create an object of Invoice. Call and display that object's details and invoiceTotal. And then set its attributes with some new values, display its updated details including invoice total.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions