Esempio n. 1
0
        public void ArePredicitionResultToStringReturningEmptyString()
        {
            var result = new PredictionResult
            {
                Predictions = new List <Prediction> {
                    new Prediction {
                        Probability = 0.2, TagName = "Restaurant1"
                    },
                    new Prediction {
                        Probability = 0.01, TagName = "Restaurant2"
                    },
                    new Prediction {
                        Probability = 0.1, TagName = "Restaurant3"
                    }
                }
            };

            Assert.AreEqual("", result.ToString(), "The Prediction Result is " + result.ToString() + ", while expected \"\".");
        }
Esempio n. 2
0
        public void ArePredicitionResultToStringReturningGoodElement()
        {
            var result = new PredictionResult
            {
                Predictions = new List <Prediction> {
                    new Prediction {
                        Probability = 0.5, TagName = "Restaurant1"
                    },
                    new Prediction {
                        Probability = 8.5, TagName = "Restaurant2"
                    },
                    new Prediction {
                        Probability = 73.5, TagName = "Restaurant3"
                    },
                    new Prediction {
                        Probability = 65.5, TagName = "Restaurant4"
                    }
                }
            };

            Assert.AreEqual("Restaurant3", result.ToString(), "The Prediction Result is " + result.ToString() + ", while expected Restaurant3.");
        }