Diff
Not logged in

Differences From Artifact [6fc712fa8c]:

To Artifact [4a12ad25f8]:


241
242
243
244
245
246
247

248


249

250
251
252
253
254
255
256

257

258
259
260
261
262
263
264
265
266
267
268
                                                UiEvent::Terminate => break,
                                            }
                                        }
                                    }
                                }
                            });


        assert!(nw_event_sender.send(NetworkEvent::Connected(TOKEN)).is_ok());


        assert!(ui_event_sender.send(UiEvent::CreateDirectory(DIR_NAME.to_string())).is_ok());

        assert!(ui_event_sender.send(UiEvent::Terminate).is_ok());

        ::std::thread::sleep(::std::time::Duration::from_millis(500));

        assert!(ui_event_sender.send(UiEvent::Terminate).is_err());
        assert!(nw_event_sender.send(NetworkEvent::Disconnected).is_err());


        let result = ui_event_sender.send(UiEvent::CreateDirectory(DIR_NAME.to_owned())).err();

        if let EventSenderError::EventSubset(send_err) = unwrap!(result) {
            if let UiEvent::CreateDirectory(dir_name) = send_err.0 {
                assert_eq!(dir_name, DIR_NAME)
            } else {
                panic!("Expected a different event !")
            }
        } else {
            panic!("Expected a different error !")
        }
    }
}







>
|
>
>
|
>







>
|
>











241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
                                                UiEvent::Terminate => break,
                                            }
                                        }
                                    }
                                }
                            });

        assert!(nw_event_sender
                    .send(NetworkEvent::Connected(TOKEN))
                    .is_ok());
        assert!(ui_event_sender
                    .send(UiEvent::CreateDirectory(DIR_NAME.to_string()))
                    .is_ok());
        assert!(ui_event_sender.send(UiEvent::Terminate).is_ok());

        ::std::thread::sleep(::std::time::Duration::from_millis(500));

        assert!(ui_event_sender.send(UiEvent::Terminate).is_err());
        assert!(nw_event_sender.send(NetworkEvent::Disconnected).is_err());

        let result = ui_event_sender
            .send(UiEvent::CreateDirectory(DIR_NAME.to_owned()))
            .err();
        if let EventSenderError::EventSubset(send_err) = unwrap!(result) {
            if let UiEvent::CreateDirectory(dir_name) = send_err.0 {
                assert_eq!(dir_name, DIR_NAME)
            } else {
                panic!("Expected a different event !")
            }
        } else {
            panic!("Expected a different error !")
        }
    }
}