@Test public void getCreateWithNoViewModelColumn_returnsSelectStar(){ final MockViewModel mockViewModel = new MockViewModel("VIEW_MODEL", new Path("PATH1", "PATH2")); final String sqlCreateQuery = mockViewModel.getCreate(mContext); assertThat(sqlCreateQuery).isEqualTo("CREATE VIEW IF NOT EXISTS VIEW_MODEL AS SELECT * FROM TABLE JOIN MYTABLE;"); }
@Override public String getCreate(final Context context) { final String name = getName(context); final List<Column> columns = getColumns(context); final String createColumns = createColumns(columns); final String selection = getSelection(context); final String create = String.format(CREATE, name, createColumns, selection); return create; }
ViewModel extends Model { @Override public String getCreate(final Context context) { final String name = getName(context); final List<Column> columns = getColumns(context); final String createColumns = createColumns(columns); final String selection = getSelection(context); final String create = String.format(CREATE, name, createColumns, selection); return create; } }
ViewModel extends Model { @Override public String getCreate(final Context context) { final String name = getName(context); final List<Column> columns = getColumns(context); final String createColumns = createColumns(columns); final String selection = getSelection(context); final String create = String.format(CREATE, name, createColumns, selection); return create; }  }
ViewModel extends Model { @Override public String getCreate(final Context context) { final String name = getName(context); final List<Column> columns = getColumns(context); final String createColumns = createColumns(columns); final String selection = getSelection(context); final String create = String.format(CREATE, name, createColumns, selection); return create; }  @Override String getCreate(final Context context); @Override String getDrop(final Context context); @Override int getVersion(final Context context); static String createColumns(final List<Column> columns); }
ViewModel extends Model { @Override public String getCreate(final Context context) { final String name = getName(context); final List<Column> columns = getColumns(context); final String createColumns = createColumns(columns); final String selection = getSelection(context); final String create = String.format(CREATE, name, createColumns, selection); return create; }  @Override String getCreate(final Context context); @Override String getDrop(final Context context); @Override int getVersion(final Context context); static String createColumns(final List<Column> columns);  }