You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Test]
public void Create_When_HealthCheckIdIsNotNull_Returns_Created()
{
var healthCheck = new HealthCheckCreateViewModel
{
Title = "Test HealthCheck for HealthCheckSummary (create)",
Project = new ProjectId { Id = 1 },
Survey = new SurveyId { Id = 1 }
};
var healthCheckSetupViewModel = new Fixture().Create<HealthCheckSetupViewModel>();
var interviewer = new Fixture()
.Build<ParticipantCreateViewModel>()
.With(x => x.Employee, 2)
.With(x => x.IsInterviewer, true)
.Create();
var participantModel = new ParticipantsCreateViewModel { Items = new[] { interviewer } };
Scenario.New()
.Given()
.HasPerformed<CreateHealthCheck>(x => x.Model = healthCheck)
.HasPerformed<SetupHealthCheck, ValueWrapper<long>>(
(x, id) =>
{
x.HealthCheckId = id.Value;
x.Model = healthCheckSetupViewModel;
})
.HasPerformed<LaunchHealthCheck, ValueWrapper<long>>(
(x, id) =>
{
x.HealthCheckId = id.Value;
x.SendNotifications = true;
})
.HasPerformed<AddEmployee, ValueWrapper<long>>(
(x, id) =>
{
x.HealthCheckId = id.Value;
x.Model = participantModel;
})
.HasPerformed<GetInterviewers, ValueWrapper<long>>(
(x, id) => x.HealthCheckId = id.Value)
.HasPerformed<CompleteHealthCheck, ValueWrapper<long>, ValueWrapper<IEnumerable<ParticipantViewModel>>> (
(x, id, model) =>
{
x.HealthCheckId = id.Value;
x.InterviewerId = model.Value.First().UniqueId;
}
)
.When()
.Performs<HttpRequest, ValueWrapper<long>>(
(request, id) => request
.Method(WebRequestMethods.Http.Post)
.Url(string.Format(_url, id.Value)))
.Then()
.Expects<HttpResponse, ValueWrapper<long>>(
(r, b) => r.Status(HttpStatusCode.Created))
.Run();
}
ADDITIONAL CONTEXT
any advice who to make it more understandable ???
The text was updated successfully, but these errors were encountered:
DKarzhounikGDT
changed the title
MAKE IT USABLE it is hard to use and support because of incomprehensive code
make it usable it is hard to use and support because of incomprehensive code
Sep 17, 2021
DESCRIPTION
ADDITIONAL CONTEXT
any advice who to make it more understandable ???
The text was updated successfully, but these errors were encountered: