Example #1
0
        public async Task TestCreateMenu_ShouldWriteOKAsync()
        {
            MenuService service = new MenuService();
            await service.AddMainMenuAsync("主页");    //1

            await service.AddMainMenuAsync("快速起步");  //2

            await service.AddMainMenuAsync("常用MOD"); //3

            await service.AddMainMenuAsync("最新消息");  //4

            await service.AddMainMenuAsync("捐赠开发者"); //5

            await service.AddFirstChildMenuAsync("如何修路", 2);

            await service.AddFirstChildMenuAsync("如何修水管", 2);

            await service.AddFirstChildMenuAsync("如何分区", 2);

            await service.AddFirstChildMenuAsync("连连乐", 3);

            await service.AddFirstChildMenuAsync("挪挪乐", 3);

            await service.AddFirstChildMenuAsync("Forest Brush v.1.2.5", 3);

            await service.AddFirstChildMenuAsync("校园 DLC", 4);

            await service.AddFirstChildMenuAsync("开发者日志(十八)", 4);

            Assert.True(service.GetById(1).Name == "主页");
        }