Here you can find the source of assertEquals(String expected, String current)
Parameter | Description |
---|---|
expected | The expected value. |
current | The current value. |
private static void assertEquals(String expected, String current)
//package com.java2s; //License from project: Open Source License public class Main { /**//w ww .j a v a2s .co m * This method is used in the static block to checks whether the field costCenter is available. * In order to be able to use this method in the static block this method has to be static, too. * * @param expected The expected value. * @param current The current value. */ private static void assertEquals(String expected, String current) { if (!expected.equals(current)) { throw new RuntimeException("Assertion failed. Expected: <" + expected + "> but was: <" + current + ">"); } } }