Insertテスト WIP

This commit is contained in:
r-ca 2023-12-18 00:07:06 +09:00
parent 820cf6ea87
commit 93971a097a
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -8,12 +8,29 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import java.util.UUID;
import javax.inject.Inject;
import dagger.multibindings.IntKey;
import one.nem.lacerta.data.DocumentDebug;
import one.nem.lacerta.model.document.DocumentMeta;
import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.path.DocumentPath;
import one.nem.lacerta.model.document.tag.DocumentTag;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
* Use the {@link DebugMenuDocumentTesterManageFragment#newInstance} factory method to * Use the {@link DebugMenuDocumentTesterManageFragment#newInstance} factory method to
* create an instance of this fragment. * create an instance of this fragment.
*/ */
public class DebugMenuDocumentTesterManageFragment extends Fragment { public class DebugMenuDocumentTesterManageFragment extends Fragment {
@Inject
DocumentDebug documentDebug;
public DebugMenuDocumentTesterManageFragment() { public DebugMenuDocumentTesterManageFragment() {
// Required empty public constructor // Required empty public constructor
} }
@ -34,6 +51,16 @@ public class DebugMenuDocumentTesterManageFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
// Inflate the layout for this fragment // Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_debug_menu_document_tester_manage, container, false); View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_manage, container, false);
view.findViewById(R.id.button_insert_test_data).setOnClickListener( v -> {
DocumentMeta meta = new DocumentMeta("test_title");
DocumentPath path = new DocumentPath("root", "test_path");
DocumentDetail detail = new DocumentDetail(meta, path, "test_author", "test_default_branch");
documentDebug.insertDocument(meta, detail);
});
return view;
} }
} }