public IntegrationBlog()
        {
            request = new HttpRequestMessage
            {
                Method     = HttpMethod.Get,
                RequestUri = new Uri("https://localhost:5001/api/v1/blog"),
            };

            client = FactoryWebApplication.GetWebApplication();

            _integrationBase = new IntegrationBase(request, client);
        }
Beispiel #2
0
        public async void Integration_Authenticate_user_incorrected_password()
        {
            var client = FactoryWebApplication.GetWebApplication();

            userInputModel.Password_Text = "password1";

            var json = JsonConvert.SerializeObject(userInputModel);

            request.Content = new StringContent(json, Encoding.UTF8, "application/json");

            var response = client.PostAsync(request.RequestUri.AbsolutePath, request.Content).ConfigureAwait(false);

            var responseInfo = response.GetAwaiter().GetResult();

            var forecast = JsonConvert.DeserializeObject <ResultAuthenticate>(await responseInfo.Content.ReadAsStringAsync());

            Assert.False(forecast.result);
        }
Beispiel #3
0
        public IntegrationPatient()
        {
            patientInputModel = new PatientInputModel {
                Name = "nome test"
            };

            request = new HttpRequestMessage
            {
                Method     = HttpMethod.Get,
                RequestUri = new Uri("https://localhost:5001/api/v1/patient"),
            };

            client = FactoryWebApplication.GetWebApplication();

            settings = new JsonSerializerSettings
            {
                ContractResolver      = new PrivateSetterContractResolver(),
                NullValueHandling     = NullValueHandling.Ignore,
                MissingMemberHandling = MissingMemberHandling.Ignore
            };
        }