mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 10:13:42 +00:00
PM-3349 PM-3350 Fixed Unit tests because of referencing FFImageLoading when it's not possible
This commit is contained in:
@@ -32,6 +32,11 @@
|
||||
get { return (Aspect)GetValue(AspectProperty); }
|
||||
set { SetValue(AspectProperty, value); }
|
||||
}
|
||||
|
||||
public bool IsLoading { get; set; }
|
||||
|
||||
public event EventHandler Success;
|
||||
public event EventHandler Error;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace Bit.App.Controls
|
||||
});
|
||||
}
|
||||
|
||||
#if !UT
|
||||
public void Icon_Success(object sender, FFImageLoading.Maui.CachedImageEvents.SuccessEventArgs e)
|
||||
{
|
||||
if (BindingContext is CipherItemViewModel cipherItemVM)
|
||||
@@ -72,6 +73,10 @@ namespace Bit.App.Controls
|
||||
IconPlaceholder.IsVisible = true;
|
||||
});
|
||||
}
|
||||
#else
|
||||
private void Icon_Success(object sender, EventArgs e) {}
|
||||
private void Icon_Error(object sender, EventArgs e) {}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class StubBaseCipherViewCellSoLinkerDoesntRemoveMethods : BaseCipherViewCell
|
||||
@@ -81,6 +86,7 @@ namespace Bit.App.Controls
|
||||
|
||||
public static void CallThisSoLinkerDoesntRemoveMethods()
|
||||
{
|
||||
#if !UT
|
||||
var stub = new StubBaseCipherViewCellSoLinkerDoesntRemoveMethods();
|
||||
|
||||
try
|
||||
@@ -98,6 +104,7 @@ namespace Bit.App.Controls
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user