public void GetConstructedUri_NoParamaters_MatchesExpected()
        {
            var query = new GetGameVariant();

            var uri = query.GetConstructedUri();

            Assert.AreEqual(BaseUri, uri);
        }
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetGameVariant();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/game-variants/", uri);
        }
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetGameVariant();

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{null}/gamevariants/{null}", uri);
        }
示例#4
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetGameVariant();

            var uri = query.GetConstructedUri();

            Assert.AreEqual("metadata/h5/metadata/game-variants/", uri);
        }
示例#5
0
        public void GetConstructedUri_NoParameters_MatchesExpected()
        {
            var query = new GetGameVariant();

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{null}/gamevariants/{null}", uri);
        }
        public void GetConstructedUri_ForGameVariantId_MatchesExpected(string guid)
        {
            var query = new GetGameVariant()
                .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"metadata/h5/metadata/game-variants/{guid}", uri);
        }
示例#7
0
        public void GetConstructedUri_ForGameVariantId_MatchesExpected(string guid)
        {
            var query = new GetGameVariant()
                        .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"metadata/h5/metadata/game-variants/{guid}", uri);
        }
        public void GetConstructedUri_InGameMode_MatchesExpected(string guid)
        {
            var query = new GetGameVariant()
                .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{null}/gamevariants/{guid}", uri);
        }
        public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag)
        {
            var query = new GetGameVariant()
                .ForPlayer(gamertag);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{gamertag}/gamevariants/{null}", uri);
        }
示例#10
0
        public void GetConstructedUri_InGameMode_MatchesExpected(string guid)
        {
            var query = new GetGameVariant()
                        .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{null}/gamevariants/{guid}", uri);
        }
示例#11
0
        public void GetConstructedUri_ForPlayer_MatchesExpected(string gamertag)
        {
            var query = new GetGameVariant()
                        .ForPlayer(gamertag);

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{gamertag}/gamevariants/{null}", uri);
        }
示例#12
0
        public void GetConstructedUri_Complex_MatchesExpected(string gamertag, string guid)
        {
            var query = new GetGameVariant()
                .ForPlayer(gamertag)
                .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{gamertag}/gamevariants/{guid}", uri);
        }
示例#13
0
        public void GetConstructedUri_Complex_MatchesExpected(string gamertag, string guid)
        {
            var query = new GetGameVariant()
                        .ForPlayer(gamertag)
                        .ForGameVariantId(new Guid(guid));

            var uri = query.GetConstructedUri();

            Assert.AreEqual($"ugc/h5/players/{gamertag}/gamevariants/{guid}", uri);
        }
示例#14
0
        public async Task GetGameVariant_SchemaIsValid(string guid)
        {
            var gameVariantSchema = JSchema.Parse(File.ReadAllText(Config.GameVariantJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri  = new Uri(Path.GetFullPath(Config.GameVariantJsonSchemaPath))
            });

            var query = new GetGameVariant()
                        .ForGameVariantId(new Guid(guid))
                        .SkipCache();

            var jArray = await Global.Session.Get <JObject>(query.GetConstructedUri());

            SchemaUtility.AssertSchemaIsValid(gameVariantSchema, jArray);
        }
示例#15
0
        public async Task GetGameVariant_SchemaIsValid(string guid)
        {
            var gameVariantSchema = JSchema.Parse(File.ReadAllText(Config.GameVariantJsonSchemaPath), new JSchemaReaderSettings
            {
                Resolver = new JSchemaUrlResolver(),
                BaseUri = new Uri(Path.GetFullPath(Config.GameVariantJsonSchemaPath))
            });

            var query = new GetGameVariant()
                .ForGameVariantId(new Guid(guid))
                .SkipCache();

            var jArray = await Global.Session.Get<JObject>(query.GetConstructedUri());

            SchemaUtility.AssertSchemaIsValid(gameVariantSchema, jArray);
        }