public void SettingAnInvalidScanResultDoesNotNavigateBack(string schema) { var navigation = A.Fake <INavigationService>(); var device = A.Fake <IPlatformSpecific>(); var logging = A.Fake <ILoggingService>(); var viewModel = new QRScanPageViewModel(device, navigation, logging); viewModel.LastScanResult = new Result( schema, Array.Empty <byte>(), Array.Empty <ResultPoint>(), BarcodeFormat.QR_CODE); A.CallTo(() => navigation.GoBack()).MustNotHaveHappened(); }
public void SettingAValidScanResultNavigatesBack() { var navigation = A.Fake <INavigationService>(); var device = A.Fake <IPlatformSpecific>(); var logging = A.Fake <ILoggingService>(); var viewModel = new QRScanPageViewModel(device, navigation, logging); viewModel.LastScanResult = new Result( "wallabag://[email protected]", Array.Empty <byte>(), Array.Empty <ResultPoint>(), BarcodeFormat.QR_CODE); A.CallTo(() => navigation.GoBack()).MustHaveHappened(); }