コード例 #1
0
        public void CanViewAPlayersSpecialistPackages()
        {
            SubmitCustomSpecialistResponse response = submitCustomSpecialist("MyCustomSpecialist");

            CreateSpecialistPackageResponse packageResponse = client.CreateSpecialistPackage(
                new CreateSpecialistPackageRequest()
            {
                SpecialistPackage = new SpecialistPackage()
                {
                    PackageName   = "myPackage",
                    SpecialistIds = { response.SpecialistConfigurationId },
                }
            });

            Assert.IsTrue(packageResponse.Status.IsSuccess);
            Assert.NotNull(packageResponse.SpecialistPackageId);

            GetPlayerSpecialistPackagesResponse playerPackages = client.GetPlayerSpecialistPackages(new GetPlayerSpecialistPackagesRequest()
            {
                PlayerId = authHelper.getAccountId("userOne")
            });

            Assert.True(playerPackages.PlayerPackages.Count == 1);
            Assert.True(playerPackages.PlayerPackages[0].Creator.Username == "userOne");
            Assert.True(playerPackages.PlayerPackages[0].SpecialistIds.Count == 1);
            Assert.True(playerPackages.PlayerPackages[0].SpecialistIds.Count(it => it == response.SpecialistConfigurationId) == 1);
        }