mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Insertテスト WIP
This commit is contained in:
parent
820cf6ea87
commit
93971a097a
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user