diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java index 08de764c..ec0157b0 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java @@ -8,12 +8,29 @@ import android.view.LayoutInflater; import android.view.View; 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. * Use the {@link DebugMenuDocumentTesterManageFragment#newInstance} factory method to * create an instance of this fragment. */ public class DebugMenuDocumentTesterManageFragment extends Fragment { + + @Inject + DocumentDebug documentDebug; + public DebugMenuDocumentTesterManageFragment() { // Required empty public constructor } @@ -34,6 +51,16 @@ public class DebugMenuDocumentTesterManageFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // 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; } } \ No newline at end of file