public void ExpandViewLocations_NoDevice_ReturnsExpected() { var context = SetupViewLocationExpanderContext(); var viewLocations = new List <string>() { "/Views/{1}/{0}.cshtml", "/Views/Shared/{0}.cshtml" }; var locationExpander = new ResponsiveViewLocationExpander(); var resultLocations = locationExpander.ExpandViewLocations(context, viewLocations); Assert.Equal(viewLocations, resultLocations); }
public void ExpandViewLocations_ViewLocationExpanderContext_IEnumerable_ReturnsExpected( ResponsiveViewLocationFormat format, IEnumerable <string> viewLocations, IEnumerable <string> expectedViewLocations) { var context = SetupViewLocationExpanderContext(); var locationExpander = new ResponsiveViewLocationExpander(format); locationExpander.PopulateValues(context); var resultLocations = locationExpander.ExpandViewLocations(context, viewLocations).ToList(); Assert.Equal(expectedViewLocations, resultLocations.ToList()); }
public void ExpandViewLocations_ViewLocationExpanderContext_IEnumerable_ReturnsExpected() { var context = SetupViewLocationExpanderContext(); var viewLocations = new List <string>() { "{0} location1", "{0} location2" }; var locationExpander = new ResponsiveViewLocationExpander(); locationExpander.PopulateValues(context); var resultLocations = locationExpander.ExpandViewLocations(context, viewLocations); Assert.True(viewLocations.Count < resultLocations.ToList().Count); }
public void ExpandViewLocations_ViewLocationExpanderContext_Null_ThrowsArgumentNullException() { var locationExpander = new ResponsiveViewLocationExpander(); Assert.Throws <ArgumentNullException>(() => locationExpander.ExpandViewLocations(SetupViewLocationExpanderContext(), null)); }
public void ExpandViewLocations_Null_IEnumerable_ThrowsArgumentNullException() { var locationExpander = new ResponsiveViewLocationExpander(); Assert.Throws <ArgumentNullException>(() => locationExpander.ExpandViewLocations(null, new List <string>())); }