fn copy_paste_deleted_layers() {
		init_logger();
		let mut editor = create_editor_with_three_layers();

		const ELLIPSE_INDEX: usize = 2;
		const SHAPE_INDEX: usize = 1;
		const RECT_INDEX: usize = 0;

		let document_before_copy = editor.dispatcher.document_message_handler.active_document().document.clone();
		let rect_id = document_before_copy.root.as_folder().unwrap().layer_ids[RECT_INDEX];
		let ellipse_id = document_before_copy.root.as_folder().unwrap().layer_ids[ELLIPSE_INDEX];

		editor.handle_message(Message::Document(DocumentMessage::SelectLayers(vec![vec![rect_id], vec![ellipse_id]]))).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::CopySelectedLayers)).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::DeleteSelectedLayers)).unwrap();
		editor.draw_rect(0, 800, 12, 200);
		editor.handle_message(Message::Document(DocumentMessage::PasteLayers { path: vec![], insert_index: -1 })).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::PasteLayers { path: vec![], insert_index: -1 })).unwrap();

		let document_after_copy = editor.dispatcher.document_message_handler.active_document().document.clone();

		let layers_before_copy = document_before_copy.root.as_folder().unwrap().layers();
		let layers_after_copy = document_after_copy.root.as_folder().unwrap().layers();

		assert_eq!(layers_before_copy.len(), 3);
		assert_eq!(layers_after_copy.len(), 6);

		let rect_before_copy = &layers_before_copy[RECT_INDEX];
		let ellipse_before_copy = &layers_before_copy[ELLIPSE_INDEX];

		assert_eq!(layers_after_copy[0], layers_before_copy[SHAPE_INDEX]);
		assert_eq!(&layers_after_copy[2], rect_before_copy);
		assert_eq!(&layers_after_copy[3], ellipse_before_copy);
		assert_eq!(&layers_after_copy[4], rect_before_copy);
		assert_eq!(&layers_after_copy[5], ellipse_before_copy);
	}
/// - create rect, shape and ellipse
/// - select ellipse and rect
/// - copy
/// - delete
/// - create another rect
/// - paste
/// - paste
create rect, shape and ellipse
select ellipse and rect
copy
delete
create another rect
paste
paste
create rect shape and ellipse select ellipse and rect copy delete create another rect paste paste
fn copy_paste_deleted_layers() {
		init_logger();
		let mut editor = create_editor_with_three_layers();
		const ELLIPSE_INDEX: usize = 2;
		const SHAPE_INDEX: usize = 1;
		const RECT_INDEX: usize = 0;
		let document_before_copy = editor.dispatcher.document_message_handler.active_document().document.clone();
		let rect_id = document_before_copy.root.as_folder().unwrap().layer_ids[RECT_INDEX];
		let ellipse_id = document_before_copy.root.as_folder().unwrap().layer_ids[ELLIPSE_INDEX];
		editor.handle_message(Message::Document(DocumentMessage::SelectLayers(vec![vec![rect_id], vec![ellipse_id]]))).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::CopySelectedLayers)).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::DeleteSelectedLayers)).unwrap();
		editor.draw_rect(0, 800, 12, 200);
		editor.handle_message(Message::Document(DocumentMessage::PasteLayers { path: vec![], insert_index: -1 })).unwrap();
		editor.handle_message(Message::Document(DocumentMessage::PasteLayers { path: vec![], insert_index: -1 })).unwrap();
		let document_after_copy = editor.dispatcher.document_message_handler.active_document().document.clone();
		let layers_before_copy = document_before_copy.root.as_folder().unwrap().layers();
		let layers_after_copy = document_after_copy.root.as_folder().unwrap().layers();
		assert_eq!(layers_before_copy.len(), 3);
		assert_eq!(layers_after_copy.len(), 6);
		let rect_before_copy = &layers_before_copy[RECT_INDEX];
		let ellipse_before_copy = &layers_before_copy[ELLIPSE_INDEX];
		assert_eq!(layers_after_copy[0], layers_before_copy[SHAPE_INDEX]);
		assert_eq!(&layers_after_copy[2], rect_before_copy);
		assert_eq!(&layers_after_copy[3], ellipse_before_copy);
		assert_eq!(&layers_after_copy[4], rect_before_copy);
		assert_eq!(&layers_after_copy[5], ellipse_before_copy);
	}
fn copy_paste_deleted_layers ( ) { init_logger ( ) ; let mut editor = create_editor_with_three_layers ( ) ; const ELLIPSE_INDEX : usize = 2 ; const SHAPE_INDEX : usize = 1 ; const RECT_INDEX : usize = 0 ; let document_before_copy = editor . dispatcher . document_message_handler . active_document ( ) . document . clone ( ) ; let rect_id = document_before_copy . root . as_folder ( ) . unwrap ( ) . layer_ids [ RECT_INDEX ] ; let ellipse_id = document_before_copy . root . as_folder ( ) . unwrap ( ) . layer_ids [ ELLIPSE_INDEX ] ; editor . handle_message ( Message :: Document ( DocumentMessage :: SelectLayers ( vec ! [ vec [ rect_id ] vec [ ellipse_id ] ] ) ) ) . unwrap ( ) ; editor . handle_message ( Message :: Document ( DocumentMessage :: CopySelectedLayers ) ) . unwrap ( ) ; editor . handle_message ( Message :: Document ( DocumentMessage :: DeleteSelectedLayers ) ) . unwrap ( ) ; editor . draw_rect ( 0 , 800 , 12 , 200 ) ; editor . handle_message ( Message :: Document ( DocumentMessage :: PasteLayers { path : vec ! [ ] , insert_index : - 1 } ) ) . unwrap ( ) ; editor . handle_message ( Message :: Document ( DocumentMessage :: PasteLayers { path : vec ! [ ] , insert_index : - 1 } ) ) . unwrap ( ) ; let document_after_copy = editor . dispatcher . document_message_handler . active_document ( ) . document . clone ( ) ; let layers_before_copy = document_before_copy . root . as_folder ( ) . unwrap ( ) . layers ( ) ; let layers_after_copy = document_after_copy . root . as_folder ( ) . unwrap ( ) . layers ( ) ; assert_eq ! ( layers_before_copy len ( ) 3 ) ; assert_eq ! ( layers_after_copy len ( ) 6 ) ; let rect_before_copy = & layers_before_copy [ RECT_INDEX ] ; let ellipse_before_copy = & layers_before_copy [ ELLIPSE_INDEX ] ; assert_eq ! ( layers_after_copy [ 0 ] layers_before_copy [ SHAPE_INDEX ] ) ; assert_eq ! ( layers_after_copy [ 2 ] rect_before_copy ) ; assert_eq ! ( layers_after_copy [ 3 ] ellipse_before_copy ) ; assert_eq ! ( layers_after_copy [ 4 ] rect_before_copy ) ; assert_eq ! ( layers_after_copy [ 5 ] ellipse_before_copy ) ; }
create rect, shape and ellipse
 select ellipse and rect
 copy
 delete
 create another rect
 paste
 paste
create rect shape and ellipse select ellipse and rect copy delete create another rect paste paste