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)); }
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)); }
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)); }
public void GetNumericEntity_ReturnsHandlesNullInput_Test() { Assert.Equal(BotConstants.OtherConstants.DefaultTopN, MiscService.GetNumericEntity(null)); }