00116 20150401 Class Assert - AngryQA/blog GitHub Wiki
Class Assert
AngryQA | 2015-04-01 ์์์ผ ์คํ 10:31 | ํ ์คํธ ๋๊ตฌ/JUint ๋ฑ / ๋จ์ํ ์คํธ | ์๋ณธ
JUnit์ ์ฌ์ฉํ์ฌ ๋จ์ ํ ์คํธ๋ฅผ ๋ง๋ค๋ ์ค
๋จ์ ๋ฌธ์ ๋ํ ์ ๋ฆฌ๊ฐ ํ์ํ์ฌ ์์ฑํ๋ ํฌ์คํธ์ ๋๋ค~ :D
์์ธํ ๋จ์ ๋ฌธ์ ๋ํ ์ค๋ช ์ ์๋ ๋งํฌ ์ฐธ์กฐ๋ถํ๋๋ฆฝ๋๋ค!
http://junit.sourceforge.net/javadoc/org/junit/Assert.html
โป๋ํ์ ์ธ ๋จ์ ๋ฌธ
assertArrayEquals(a,b) : ๋ฐฐ์ด a์b๊ฐ ์ผ์นํจ์ ํ์ธ
[assertArrayEquals](http://junit.sourceforge.net/javadoc/org/junit/Assert.html#assertArrayEquals(byte[], byte[]))(byte[] expecteds, byte[] actuals) Asserts that two byte arrays are equal.
assertEquals(a,b) : ๊ฐ์ฒด a์b์ ๊ฐ์ด ๊ฐ์์ง ํ์ธ
[assertEquals](http://junit.sourceforge.net/javadoc/org/junit/Assert.html#assertEquals(double, double))(double expected, double actual) Deprecated. Use assertEquals(double expected, double actual, double epsilon) instead
assertSame(a,b) : ๊ฐ์ฒด a์b๊ฐ ๊ฐ์ ๊ฐ์ฒด์์ ํ์ธ
[assertSame](http://junit.sourceforge.net/javadoc/org/junit/Assert.html#assertSame(java.lang.Object, java.lang.Object))(java.lang.Object expected, java.lang.Object actual) Asserts that two objects refer to the same object.
assertTrue(a) : a๊ฐ ์ฐธ์ธ์ง ํ์ธ
assertTrue(boolean condition) Asserts that a condition is true.
assertNotNull(a) : a๊ฐ์ฒด๊ฐ null์ด ์๋์ ํ์ธ
assertNotNull(java.lang.Object object) Asserts that an object isn't null.