public void Test_ToastV2_AppLogo_Source_Defaults() { var appLogo = new ToastGenericAppLogo() { Source = "http://xbox.com/Avatar.jpg" }; AssertAppLogoPayload(@"<image placement=""appLogoOverride"" src=""http://xbox.com/Avatar.jpg""/>", appLogo); }
public void Test_ToastV2_AppLogo_Source_AddImageQuery_True() { var appLogo = new ToastGenericAppLogo() { Source = "http://xbox.com/Avatar.jpg", AddImageQuery = true }; AssertAppLogoPayload(@"<image placement=""appLogoOverride"" src=""http://xbox.com/Avatar.jpg"" addImageQuery=""true""/>", appLogo); }
public void Test_ToastV2_AppLogo_Crop_None() { var appLogo = new ToastGenericAppLogo() { HintCrop = ToastGenericAppLogoCrop.None, Source = "img.png" }; AssertAppLogoPayload(@"<image src='img.png' placement=""appLogoOverride"" hint-crop='none'/>", appLogo); }
public void Test_ToastV2_AppLogo_Crop_Circle() { var appLogo = new ToastGenericAppLogo() { HintCrop = ToastGenericAppLogoCrop.Circle, Source = "img.png" }; AssertAppLogoPayload(@"<image src=""img.png"" placement=""appLogoOverride"" hint-crop=""circle""/>", appLogo); }
private static void AssertAppLogoPayload(string expectedAppLogoXml, ToastGenericAppLogo appLogo) { AssertVisualPayload(@"<visual><binding template=""ToastGeneric"">" + expectedAppLogoXml + "</binding></visual>", new ToastVisual() { BindingGeneric = new ToastBindingGeneric() { AppLogoOverride = appLogo } }); }