Skip to content

Instantly share code, notes, and snippets.

@wviana wviana/Error.log
Created May 24, 2016

Embed
What would you like to do?
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)
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
You can’t perform that action at this time.