Created
May 24, 2016 19:06
-
-
Save wviana/8e01423956f58bf2504f2cb14b03c10b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.RuntimeException: Method from in android.view.LayoutInflater not mocked. See http://g.co/androidstudio/not-mocked for details. | |
at android.view.LayoutInflater.from(LayoutInflater.java) | |
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:174) | |
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:125) | |
at neocom.dealerbook.views.LayerView.<init>(LayerView.java:33) | |
at neocom.dealerbook.views.LayerView$Builder.build(LayerView.java:101) | |
at LayerViewBuilderTest.test_addSelector(LayerViewBuilderTest.java:24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.test.mock.MockContext; | |
import org.junit.Test; | |
/** | |
* Created by wviana on 5/24/16. | |
*/ | |
import neocom.dealerbook.views.LayerView; | |
import static junit.framework.Assert.*; | |
import static org.mockito.Mockito.*; | |
public class LayerViewBuilderTest { | |
@Test | |
public void test_addSelector() { | |
String[] selectorValues = {"2015", "2016", "2017"}; | |
Context context = new MockContext(); | |
LayerView view = new LayerView.Builder(context) | |
.addSelector(selectorValues) | |
.build(); | |
assertNotNull(view); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment