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); }
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); }
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); }
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); }
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); }