Exemplo n.º 1
0
        public void GetFoodEntities_ReturnsWhenNoRecipeInDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("name", "John");
            testParameters.Add("age", 23);

            Assert.Equal(BotConstants.OtherConstants.DefaultRecipeDish, MiscService.GetFoodEntities(testParameters, BotConstants.FoodEntitiesEnum.Recipe));
        }
Exemplo n.º 2
0
        public void GetFoodEntities_ReturnsWhenNoFoodItemInDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("name", "John");
            testParameters.Add("age", 23);

            Assert.Equal(BotConstants.OtherConstants.DefaultIngredientsSerialized, MiscService.GetFoodEntities(testParameters, BotConstants.FoodEntitiesEnum.FoodItem));
        }
Exemplo n.º 3
0
        public void GetFoodEntities_ReturnsRecipeItemFromDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("recipe", "Green salad with olives");
            testParameters.Add("number", 5);

            Assert.Equal("Green salad with olives", MiscService.GetFoodEntities(testParameters, BotConstants.FoodEntitiesEnum.Recipe));
        }
Exemplo n.º 4
0
        public void GetFoodEntities_ReturnsFoodItemFromDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("foodItem", "Basil");
            testParameters.Add("number", 5);

            Assert.Equal("Basil", MiscService.GetFoodEntities(testParameters, BotConstants.FoodEntitiesEnum.FoodItem));
        }
Exemplo n.º 5
0
 public void GetFoodEntities_HandlesNull_Test(BotConstants.FoodEntitiesEnum foodEntitiesEnum, string expectedOutput)
 {
     Assert.Equal(expectedOutput, MiscService.GetFoodEntities(null, foodEntitiesEnum));
 }