public void CreateRoute_UsesOrderPropertyWhenBuilding() { // Arrange int expectedOrder = 123; RouteFactoryAttribute product = CreateProductUnderTest(); product.Order = expectedOrder; int order = 0; IDirectRouteBuilder builder = null; builder = CreateBuilder( () => { order = builder.Order; return(null); } ); DirectRouteFactoryContext context = CreateContext((i) => builder); // Act RouteEntry ignore = product.CreateRoute(context); // Assert Assert.Equal(expectedOrder, order); }
public void CreateRoute_UsesNamePropertyWhenBuilding() { // Arrange string expectedName = "RouteName"; RouteFactoryAttribute product = CreateProductUnderTest(); product.Name = expectedName; string name = null; IDirectRouteBuilder builder = null; builder = CreateBuilder( () => { name = builder.Name; return(null); } ); DirectRouteFactoryContext context = CreateContext((i) => builder); // Act RouteEntry ignore = product.CreateRoute(context); // Assert Assert.Same(expectedName, name); }