public void Patch_async_with_token_should_add_route() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Patch <object>((_, c) => null); // then module.Routes.Single().Description.Method.Should().Be("PATCH"); }
public void Patch_route_should_add_correct_route_entry() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Patch <object>(_ => new object(), context => true, "TestRoute"); module.Patch <object>((_, c) => Task.FromResult(new object()), context => true, "TestRoute"); module.Patch <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 Patch_async_should_add_route() { // given var module = new ArgolisModuleTestable(this.templateProvider); // when module.Patch <object>(_ => Task.FromResult(new object())); // then module.Routes.Single().Description.Method.Should().Be("PATCH"); }