public void Delete_async_with_token_should_add_route() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Delete <object>((_, c) => null); // then module.Routes.Single().Description.Method.Should().Be("DELETE"); }
public void Delete_route_should_add_correct_route_entry() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Delete <object>(_ => new object(), context => true, "TestRoute"); module.Delete <object>((_, c) => Task.FromResult(new object()), context => true, "TestRoute"); module.Delete <object>(_ => Task.FromResult(new object()), context => true, "TestRoute"); // then foreach (var route in module.Routes) { var description = route.Description; description.Condition.Should().NotBeNull(); description.Name.Should().Be("TestRoute"); description.Path.Should().Be(TestTemplate); } }
public void Delete_async_should_add_route() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Delete <object>(_ => Task.FromResult(new object())); // then module.Routes.Single().Description.Method.Should().Be("DELETE"); }