请大家帮我看看这个代码,我这个junit测试BookTestCase想测试BookApp里面的minPrice方法,看是否返回的是最小价格。但是测试结果是failure,显示AssertionFailedError: expected: <34.99> but was: <0.0>。我不是很明白问题出在哪,问什么会是0.0. 是不是我整个测试代码就写错了呢?万分感谢!!
BookTestCase:

import static org.junit.jupiter.api.Assertions.*;import org.junit.Assert;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;class BookTestCase {

private BookApp obj;
private Book[] book = new Book[5]; @BeforeEach
void setUp() throws Exception {
this.obj = new BookApp();
book[0] = new Book(1, "HTLM", 56.0);
book[1] = new Book(2, "Java", 128.0);
book[2] = new Book(3, "Python", 34.99);
book[3] = new Book(4, "C#", 40.0);
book[4] = new Book(5, "C", 115.5);
} @Test 
void testPopulateBooks() {
Assertions.assertThrows(IllegalArgumentException.class, () -> obj.populateBooks(6));
}

@Test
void testMinPrice() {
assertEquals(34.99, BookApp.minPrice(book), 0.0001);
}
}
BookApp class:

import java.util.Scanner;public class BookApp {

/**
 * this method populates array of Book objects
 * @param nBooks
 * @throws IllegalArugumentException if nBooks > 5;
 */
public Book[] populateBooks(int nBooks) throws IllegalArgumentException{
if (nBooks > 5) {
    throw new IllegalArgumentException("Illegal book number: " + nBooks);
}
Scanner input = new Scanner(System.in);
Book[] books = new Book[nBooks];
for (int i = 0; i < books.length; i++) {
books[i] = new Book(0, "", 0);
System.out.print("Enter book id: ");
books[i].setId(input.nextInt());
System.out.print("Enter book name: ");
books[i].setName(input.next());
System.out.print("Enter book price: ");
books[i].setPrice(input.nextDouble());
}
return books;
}

/**
 * this method calculate the minimum price of books
 * @param b
 * @return the minimum price
 */
public static double minPrice(Book[] b) {
double min = b[0].getPrice();
for (int i = 1; i < b.length; i++) {
if (b[i].getPrice() < min)
min = b[i].getPrice();
}
return min;
}
}