示例#1
0
        public async Task GivenPatientNotesId_ReturnsSuccessStatusCode()
        {
            var id = "patientId";

            var client = _factory.CreateClient();

            var response = await client.GetAsync($"/api/patientnotes/{id}");

            response.EnsureSuccessStatusCode();
        }
        public async Task GivenValidPatientNotesItem_ReturnsSuccessStatusCode()
        {
            var client = _factory.CreateClient();

            var patientNote = new PatientNoteModel
            {
                PatientId = 1,
                Note      = "Note"
            };

            var content = IntegrationTestHelper.GetRequestContent(patientNote);

            var response = await client.PostAsync("/api/patientnotes", content);

            response.EnsureSuccessStatusCode();
        }
        public async Task GivenValidPatientNotesItem_ReturnsSuccessStatusCode()
        {
            var client = _factory.CreateClient();

            var patientNote = new PatientNoteModel
            {
                Id        = "5e4835f48ca24a0c5e408313",
                PatientId = 1,
                Note      = "Note"
            };

            var content = IntegrationTestHelper.GetRequestContent(patientNote);

            var response = await client.PutAsync($"/api/patientnotes/{patientNote.Id}", content);

            response.EnsureSuccessStatusCode();
        }