public void Should_get_request_by_path_and_method(string path, string method)
        {
            var repository = RequestFakeRepository.Load("./db-test.json");

            var request = repository.GetRequestFake(path, method);

            request.Should().NotBeNull();
            request.Method.ToLower().Should().Be(method.ToLower());
        }
        public void Should_load_json()
        {
            var repository = RequestFakeRepository.Load("./db-test.json");

            repository.Should().NotBeNull();
        }
Beispiel #3
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
     services.AddSingleton(RequestFakeRepository.Load(Environment.GetEnvironmentVariable("DATABASE_PATH") ??
                                                      Configuration.GetValue <string>("DatabasePath")));
 }