You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. using Microsoft.AspNetCore;
  2. using Microsoft.AspNetCore.Hosting;
  3. using Microsoft.AspNetCore.TestHost;
  4. using System;
  5. using System.IO;
  6. namespace Marketing.FunctionalTests.Base
  7. {
  8. public class LocationsScenariosBase
  9. {
  10. public TestServer CreateServer()
  11. {
  12. var webHostBuilder = WebHost.CreateDefaultBuilder();
  13. webHostBuilder.UseContentRoot(Directory.GetCurrentDirectory() + "\\Services\\Location");
  14. webHostBuilder.UseStartup<LocationsTestsStartup>();
  15. return new TestServer(webHostBuilder);
  16. }
  17. public static class Get
  18. {
  19. public static string Locations = "api/v1/locations";
  20. public static string LocationBy(string id)
  21. {
  22. return $"api/v1/locations/{id}";
  23. }
  24. public static string UserLocationBy(Guid id)
  25. {
  26. return $"api/v1/locations/user/{id}";
  27. }
  28. }
  29. public static class Post
  30. {
  31. public static string AddNewLocation = "api/v1/locations/";
  32. }
  33. }
  34. }