public void CategoryListNotEmptyTest() { // Act var response = TriviaApi.RequestCategoryList(); // Assert Assert.NotEmpty(response.CategoryList); }
public void SessionTokenNotNullTest() { // Act var response = TriviaApi.SendSessionTokenCommand(TokenCommand.Request); // Assert Assert.NotNull(response.Token); }
public void QuestionsNotEmptyTest(uint amount, QuestionCategory category, QuestionDifficulty difficulty, QuestionType type, ResponseEncoding encoding) { // Act var response = TriviaApi.RequestQuestions(amount, category, difficulty, type, encoding); // Assert Assert.NotEmpty(response.Questions); }
public void GlobalQuestionCountNotEmptyTest() { // Act var response = TriviaApi.RequestGlobalQuestionCount(); // Assert Assert.NotEmpty(response.CategoriesQuestionCount); Assert.NotNull(response.Overall); }
void Start() { //Find the references socialManager = GetComponent <SocialManager>(); gameManager = GetComponent <GameManager>(); audioManager = GetComponent <AudioManager>(); dataManager = GetComponent <DataManager>(); effectsManager = GetComponent <EffectsManager>(); platformManager = GetComponent <PlatformManager>(); triviaManager = GetComponent <TriviaApi>(); panelManager = GetComponent <PanelManager>(); DontDestroyOnLoad(this); }
public void NumberOfQuestionsInCategoryNotNullTest(QuestionCategory category) { // Arrange if (category == QuestionCategory.Any) { return; } // Act var response = TriviaApi.RequestNumberOfQuestionsInCategory(category); // Assert Assert.NotNull(response.CategoryQuestionCount); }
public void QuestionsInvalidAmountTest(uint amount) { // Act and Assert Assert.Throws <ArgumentOutOfRangeException>(() => TriviaApi.RequestQuestions(amount)); }
public async Task <IActionResult> GetQuestions(int count) { TriviaQuestionArrayModel questions = await TriviaApi.GetQuestions(count); return(Ok(JsonConvert.SerializeObject(questions, Formatting.Indented))); }