Testing Two-Level Header Component in SmartRefreshLayout
This test suite demonstrates basic unit testing functionality for the SmartRefreshLayout library’s two-level header component. It contains a simple arithmetic validation test that serves as an example template for implementing more comprehensive testing of the refresh header functionality.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
scwang90/smartrefreshlayout
refresh-header-two-level/src/test/java/com/scwang/smart/refresh/header/ExampleUnitTest.java
package com.scwang.smart.refresh.header;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}