मैं सोच रहा था कि assertEquals(double, double)
क्यों बहिष्कृत है।मेरा assertEquals() JUnit में बहिष्कृत क्यों है?
मैंने import static org.junit.Assert.assertEquals;
का उपयोग किया और मैंने जुनीट 4.11 का उपयोग किया।
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AccountTest {
@Test
public void test() {
Account checking = new Account(Account.CHECKING);
checking.deposit(1000.0);
checking.withdraw(100.0);
assertEquals(900.0, checking.getBalance());
}
}
checking.getBalance()
एक डबल मान देता है:
नीचे मेरी कोड है।
क्या गलत हो सकता है?
यदि आप बस जावाडोक पढ़ते हैं, तो आपको बताया जाएगा कि इसके बजाय क्या उपयोग करना है। – Andreas