public void GetAddonElements_should_handle_nonwhitespace_strings() { var items = new object[] { new Beta(), " text ", new Beta() }; var addonElements = ReflectionMetaObject.GetAddonElements(items); Assert.Same(items, addonElements); }
public void GetAddonElements_should_convert_to_strings_and_trim() { var items = new object[] { " ", "text", "a", " ", "b " }; var addonElements = ReflectionMetaObject.GetAddonElements(items); Assert.Equal(new[] { "texta b" }, addonElements); }
public void GetAddonElements_should_allow_whitespace_filtering() { Beta item1 = new Beta(); Beta item2 = new Beta(); var items = new object[] { " ", item1, item2, " " }; var addonElements = ReflectionMetaObject.GetAddonElements(items); Assert.Equal(new[] { item1, item2 }, addonElements.Cast <Beta>()); }