public void DeleteRoute_Test() { using (ShimsContext.Create()) { CloudFoundry.CloudController.V2.Client.Fakes.ShimCloudFoundryClient.AllInstances.LoginCloudCredentials = TestUtils.CustomLogin; CloudController.V2.Client.Base.Fakes.ShimAbstractDomainsDeprecatedEndpoint.AllInstances.ListAllDomainsDeprecated = TestUtils.CustomListAllDomains; CloudFoundry.CloudController.V2.Client.Fakes.ShimPagedResponseCollection <ListAllDomainsDeprecatedResponse> .AllInstances.ResourcesGet = TestUtils.CustomGetDomains; CloudFoundry.CloudController.V2.Client.Base.Fakes.ShimAbstractRoutesEndpoint.AllInstances.DeleteRouteNullableOfGuid = TestUtils.CustomDeleteRoute; CloudFoundry.CloudController.V2.Client.Fakes.ShimPagedResponseCollection <ListAllRoutesResponse> .AllInstances.ResourcesGet = TestUtils.CustomListAllRoutesResponse; CloudFoundry.CloudController.V2.Client.Base.Fakes.ShimAbstractRoutesEndpoint.AllInstances.ListAllRoutesRequestOptions = TestUtils.CustomListAllRoutes; TestUtils.InitTestMetadata(); DeleteRoute task = new DeleteRoute(); task.CFUser = Settings.Default.User; task.CFPassword = Settings.Default.Password; task.CFServerUri = Settings.Default.ServerUri; task.CFRoute = "test.domain.com"; task.BuildEngine = new FakeBuildEngine(); Assert.IsTrue(task.Execute()); } }
public void DeleteRoute_Test() { using (ShimsContext.Create()) { CloudFoundry.CloudController.V2.Client.Fakes.ShimCloudFoundryClient.AllInstances.LoginCloudCredentials = TestUtils.CustomLogin; CloudController.V2.Client.Base.Fakes.ShimAbstractDomainsDeprecatedEndpoint.AllInstances.ListAllDomainsDeprecated = TestUtils.CustomListAllDomains; CloudFoundry.CloudController.V2.Client.Fakes.ShimPagedResponseCollection<ListAllDomainsDeprecatedResponse>.AllInstances.ResourcesGet = TestUtils.CustomGetDomains; CloudFoundry.CloudController.V2.Client.Base.Fakes.ShimAbstractRoutesEndpoint.AllInstances.DeleteRouteNullableOfGuid = TestUtils.CustomDeleteRoute; CloudFoundry.CloudController.V2.Client.Fakes.ShimPagedResponseCollection<ListAllRoutesResponse>.AllInstances.ResourcesGet = TestUtils.CustomListAllRoutesResponse; CloudFoundry.CloudController.V2.Client.Base.Fakes.ShimAbstractRoutesEndpoint.AllInstances.ListAllRoutesRequestOptions = TestUtils.CustomListAllRoutes; TestUtils.InitTestMetadata(); DeleteRoute task = new DeleteRoute(); task.CFUser = Settings.Default.User; task.CFPassword = Settings.Default.Password; task.CFServerUri = Settings.Default.ServerUri; task.CFRoute = "test.domain.com"; task.BuildEngine = new FakeBuildEngine(); Assert.IsTrue(task.Execute()); } }
public AzureOperationResponse DeleteRoute(string routeTableName, string routeName) { DeleteRoute operation = new DeleteRoute(routeOperations, routeTableName, routeName); testClient.InvokeTestOperation(operation); return(operation.InvokeResponse); }
public async Task <Response> Handle(DeleteRoute request, CancellationToken cancellationToken) { await routeRepository.DeleteAsync(request.Id); return(new Response("Rota excluida com sucesso!")); }
public AzureOperationResponse DeleteRoute(string routeTableName, string routeName) { DeleteRoute operation = new DeleteRoute(routeOperations, routeTableName, routeName); testClient.InvokeTestOperation(operation); return operation.InvokeResponse; }