// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/IntKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class IntKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private Integer key;
// 
// 	public Integer getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(Integer key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/LongKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class LongKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private Long key;
// 
// 	public Long getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(Long key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/PintKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class PintKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private int key;
// 
// 	public int getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(int key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/PlongKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class PlongKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private long key;
// 
// 	public long getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(long key) {
// 		this.key = key;
// 	}
// }


import android.content.ContentValues;
import net.cattaka.util.cathandsgendroid.test.model.IntKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.IntKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.LongKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.LongKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.PintKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.PintKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.PlongKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.PlongKeyAiModelCatHands;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.robolectric.RobolectricTestRunner;
import android.database.sqlite.SQLiteDatabase;
import org.robolectric.annotation.Config;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.doReturn;
package net.cattaka.util.cathandsgendroid.test;






@RunWith(RobolectricTestRunner.class)
public class AutoIncrementTest {
	@Test
    public void testPint() {
        SQLiteDatabase db = Mockito.spy(SQLiteDatabase.create(null));
        db.execSQL(PintKeyAiModelCatHands.SQL_CREATE_TABLE);

        PintKeyAiModel m1 = new PintKeyAiModel();
        PintKeyAiModel m2 = new PintKeyAiModel();

        doReturn(1L).when(db).insert(anyString(), isNull(), any(ContentValues.class));
        PintKeyAiModelCatHands.insert(db, m1);
        doReturn(2L).when(db).insert(anyString(), isNull(), any(ContentValues.class));
        PintKeyAiModelCatHands.insert(db, m2);
        
        assertEquals(1, m1.getKey());
        assertEquals(2, m2.getKey());
    }

	@Test
    public void testPlong() {
        SQLiteDatabase db = Mockito.spy(SQLiteDatabase.create(null));
        db.execSQL(PlongKeyAiModelCatHands.SQL_CREATE_TABLE);
        
        PlongKeyAiModel m1 = new PlongKeyAiModel();
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/IntKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class IntKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private Integer key;
// 
// 	public Integer getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(Integer key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/LongKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class LongKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private Long key;
// 
// 	public Long getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(Long key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/PintKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class PintKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private int key;
// 
// 	public int getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(int key) {
// 		this.key = key;
// 	}
// }
// 
// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/model/PlongKeyAiModel.java
// @DataModel(find = "key", genDbFunc = true, autoincrement = true)
// public class PlongKeyAiModel {
// 	@DataModelAttrs(primaryKey=true)
// 	private long key;
// 
// 	public long getKey() {
// 		return key;
// 	}
// 
// 	public void setKey(long key) {
// 		this.key = key;
// 	}
// }


// Path: cathandsgendroid-apt/src/test/java/net/cattaka/util/cathandsgendroid/test/AutoIncrementTest.java
import android.content.ContentValues;
import net.cattaka.util.cathandsgendroid.test.model.IntKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.IntKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.LongKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.LongKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.PintKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.PintKeyAiModelCatHands;
import net.cattaka.util.cathandsgendroid.test.model.PlongKeyAiModel;
import net.cattaka.util.cathandsgendroid.test.model.PlongKeyAiModelCatHands;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.robolectric.RobolectricTestRunner;
import android.database.sqlite.SQLiteDatabase;
import org.robolectric.annotation.Config;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.doReturn;

package net.cattaka.util.cathandsgendroid.test;






@RunWith(RobolectricTestRunner.class)
public class AutoIncrementTest {
	@Test
    public void testPint() {
        SQLiteDatabase db = Mockito.spy(SQLiteDatabase.create(null));
        db.execSQL(PintKeyAiModelCatHands.SQL_CREATE_TABLE);

        PintKeyAiModel m1 = new PintKeyAiModel();
        PintKeyAiModel m2 = new PintKeyAiModel();

        doReturn(1L).when(db).insert(anyString(), isNull(), any(ContentValues.class));
        PintKeyAiModelCatHands.insert(db, m1);
        doReturn(2L).when(db).insert(anyString(), isNull(), any(ContentValues.class));
        PintKeyAiModelCatHands.insert(db, m2);
        
        assertEquals(1, m1.getKey());
        assertEquals(2, m2.getKey());
    }

	@Test
    public void testPlong() {
        SQLiteDatabase db = Mockito.spy(SQLiteDatabase.create(null));
        db.execSQL(PlongKeyAiModelCatHands.SQL_CREATE_TABLE);
        
        PlongKeyAiModel m1 = new PlongKeyAiModel();
        PlongKeyAiModel m2 = new PlongKeyAiModel();