public void WireToMethod_Called_ExpectRoutesAreReturnedWithSameNameAndPathAndMethodForEachVerb( string name, string path, string[] verbs, MethodInfo method) { var attribute = new NamedRouteAttribute(name, path, verbs.TakeAtLeastOneItem()); attribute.WireToMethod(method).ShouldBeEquivalentTo(attribute.Verbs.Select(v => new Route(attribute.Name, v, attribute.Path, method))); }
public void WireToMethod_CalledWithNullMethod_ExpectArgumentNullExceptionWithCorrectParamName(NamedRouteAttribute attribute) { attribute.Invoking(x => x.WireToMethod(null)) .ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("method"); }
public void WireToMethod_CalledWithNullMethod_ExpectArgumentNullExceptionWithCorrectParamName(NamedRouteAttribute attribute) { attribute.Invoking(x => x.WireToMethod(null)) .ShouldThrow<ArgumentNullException>().And.ParamName.Should().Be("method"); }