Esempio n. 1
0
        public void GetNumericEntity_HandlesEmptyStringInNumberValueFromDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("name", "John");
            testParameters.Add("number", "");

            Assert.Equal(5, MiscService.GetNumericEntity(testParameters));
        }
Esempio n. 2
0
        public void GetNumericEntity_ReturnsWhenNoNumberInDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

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

            Assert.Equal(BotConstants.OtherConstants.DefaultTopN, MiscService.GetNumericEntity(testParameters));
        }
Esempio n. 3
0
        public void GetNumericEntity_ReturnsNumberFromDictionary_Test()
        {
            Dictionary <string, object> testParameters = new Dictionary <string, object>();

            testParameters.Add("name", "John");
            testParameters.Add("number", 3);

            Assert.Equal(3, MiscService.GetNumericEntity(testParameters));
        }
Esempio n. 4
0
 public void GetNumericEntity_ReturnsHandlesNullInput_Test()
 {
     Assert.Equal(BotConstants.OtherConstants.DefaultTopN, MiscService.GetNumericEntity(null));
 }