示例#1
0
        public static ZumoTestGroup CreateTests()
        {
            ZumoTestGroup result       = new ZumoTestGroup("Push tests");
            const string  imageUrl     = "http://zumotestserver.azurewebsites.net/content/zumo2.png";
            const string  wideImageUrl = "http://zumotestserver.azurewebsites.net/content/zumo1.png";

            result.AddTest(CreateRegisterChannelTest());
            result.AddTest(CreateToastPushTest("first text", "second text"));
            result.AddTest(CreateToastPushTest("ãéìôü ÇñÑ", "الكتاب على الطاولة"));
            result.AddTest(CreateToastPushTest("这本书在桌子上", "本は机の上に"));
            result.AddTest(CreateToastPushTest("הספר הוא על השולחן", "Книга лежит на столе"));
            result.AddTest(CreateToastPushTest("with param", "a value", "/UIElements/InputDialog"));
            result.AddTest(CreateRawPushTest("hello world"));
            result.AddTest(CreateRawPushTest("foobaráéíóú"));
            result.AddTest(CreateTilePushTest(
                               "Simple tile", new Uri("/Assets/Tiles/IconicTileMediumLarge.png", UriKind.Relative), 0,
                               "Simple tile",
                               new Uri("/Assets/Tiles/IconicTileMediumLarge.png", UriKind.Relative), "Back title", "Back content"));
            result.AddTest(ZumoTestCommon.CreateTestWithSingleAlert("After clicking OK, make sure the application is pinned to the start menu"));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Is the app in the start menu?", true));
            result.AddTest(CreateTilePushTest("Tile with image", new Uri(imageUrl), 3, "Test title", new Uri(wideImageUrl), "Back title", "Back content"));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Did the tile change?", true, 3000));
            result.AddTest(CreateFlipTilePushTest("Flip tile",
                                                  new Uri("/Assets/Tiles/FlipCycleTileMedium.png", UriKind.Relative), 5, "Flip title",
                                                  new Uri("/Assets/Tiles/IconicTileSmall.png", UriKind.Relative), "Flip back title", "Flip back content",
                                                  new Uri("/Assets/Tiles/FlipCycleTileSmall.png", UriKind.Relative), new Uri("/Assets/Tiles/FlipCycleTileLarge.png", UriKind.Relative),
                                                  "Flip wide back content", new Uri("/Assets/Tiles/FlipCycleTileLarge.png", UriKind.Relative)));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Did the tile change?", true, 3000));

            result.AddTest(CreateUnregisterChannelTest());
            return(result);
        }
        public static ZumoTestGroup CreateTests()
        {
            ZumoTestGroup result = new ZumoTestGroup("Push tests");

            result.AddTest(CreateRegisterChannelTest());
            result.AddTest(CreateToastPushTest("first text", "second text"));
            result.AddTest(CreateToastPushTest("ãéìôü ÇñÑ", "الكتاب على الطاولة"));
            result.AddTest(CreateToastPushTest("这本书在桌子上", "本は机の上に"));
            result.AddTest(CreateToastPushTest("הספר הוא על השולחן", "Книга лежит на столе"));
            result.AddTest(CreateToastPushTest("with param", "a value", "/UIElements/InputDialog"));
            result.AddTest(CreateRawPushTest("hello world"));
            result.AddTest(CreateRawPushTest("foobaráéíóú"));
            result.AddTest(CreateTilePushTest(
                               "Simple tile", new Uri("/Assets/Tiles/IconicTileMediumLarge.png", UriKind.Relative), 0,
                               "Simple tile",
                               new Uri("/Assets/Tiles/IconicTileMediumLarge.png", UriKind.Relative), "Back title", "Back content"));
            result.AddTest(ZumoTestCommon.CreateTestWithSingleAlert("After clicking OK, make sure the application is pinned to the start menu"));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Is the app in the start menu?", true));
            result.AddTest(CreateTilePushTest("Tile with image", new Uri(imageUrl), 3, "Test title", new Uri(wideImageUrl), "Back title", "Back content"));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Did the tile change?", true, 3000));
            result.AddTest(CreateFlipTilePushTest("Flip tile",
                                                  new Uri("/Assets/Tiles/FlipCycleTileMedium.png", UriKind.Relative), 5, "Flip title",
                                                  new Uri("/Assets/Tiles/IconicTileSmall.png", UriKind.Relative), "Flip back title", "Flip back content",
                                                  new Uri("/Assets/Tiles/FlipCycleTileSmall.png", UriKind.Relative), new Uri("/Assets/Tiles/FlipCycleTileLarge.png", UriKind.Relative),
                                                  "Flip wide back content", new Uri("/Assets/Tiles/FlipCycleTileLarge.png", UriKind.Relative)));
            result.AddTest(ZumoTestCommon.CreateYesNoTest("Did the tile change?", true, 3000));

            result.AddTest(CreateUnregisterChannelTest());

            result.AddTest(CreateRegisterChannelTest(true, "toast"));
            result.AddTest(CreateToastPushTest("World News in English!", null, null, true));
            result.AddTest(CreateUnregisterChannelTest(true, "wp8" + ZumoPushTestGlobals.NHToastTemplateName));
            result.AddTest(CreateRegisterChannelTest(true, "tile"));
            result.AddTest(CreateTilePushTest("Tile Template", new Uri(imageUrl), 3, "在普通话的世界新闻!", null, null, null, true));
            result.AddTest(CreateUnregisterChannelTest(true, "wp8" + ZumoPushTestGlobals.NHTileTemplateName));
            result.AddTest(CreateRegisterChannelTest(true, "raw"));
            result.AddTest(CreateRawPushTest("Nouvelles du monde en français!", true));
            result.AddTest(CreateUnregisterChannelTest(true, "wp8" + ZumoPushTestGlobals.NHRawTemplateName));

            return(result);
        }