public async System.Threading.Tasks.Task GetTimeRegistrationsForTask_When_Called_With_TaskIdAndGuid_Returns_TimeRegistrations()
        {
            // Arrange
            await sut.CreateTimeRegistration(timeRegistration, timeRegistration.TenantId);

            var expectedResult = JsonConvert.SerializeObject(timeRegistrations);
            // Act
            var call = await sut.GetTimeRegistrationsForTask(timeRegistration.TaskId.Value, timeRegistration.TenantId);

            var actualResult = JsonConvert.SerializeObject(call);

            // Assert
            Assert.Equal(expectedResult, actualResult);
        }
Example #2
0
 public IHttpActionResult GetRegistrations(Guid taskId)
 {
     return(Ok(_repository.GetTimeRegistrationsForTask(taskId)));
 }