public void Given_a_no_responsibility_when_Map_then_return_null()
        {
            // Given
            Responsibility entity = null;

            // When
            var result = new ResponsibilityDtoMapper(entity).WithTasks().Map();

            // Assert
            Assert.That(result, Is.Null);
        }
        public void Given_a_responsibility_when_Map_then_properties_are_mapped()
        {
            //Given

            //When
            var result = new ResponsibilityDtoMapper(_entity.Object).WithTasks().Map();

            //Then
            Assert.That(result.Id, Is.EqualTo(_entity.Object.Id));
            Assert.That(result.CompanyId, Is.EqualTo(_entity.Object.CompanyId));
            Assert.That(result.Description, Is.EqualTo(_entity.Object.Description));
            Assert.That(result.Site.Id, Is.EqualTo(_entity.Object.Site.Id));
            Assert.That(result.InitialTaskReoccurringType, Is.EqualTo(_entity.Object.InitialTaskReoccurringType));
            Assert.That(result.Owner.Id, Is.EqualTo(_entity.Object.Owner.Id));
            Assert.That(result.Title, Is.EqualTo(_entity.Object.Title));
            Assert.That(result.ResponsibilityCategory.Id, Is.EqualTo(_entity.Object.ResponsibilityCategory.Id));
            Assert.That(result.ResponsibilityReason.Id, Is.EqualTo(_entity.Object.ResponsibilityReason.Id));
            Assert.That(result.CreatedOn, Is.EqualTo(_entity.Object.CreatedOn));

            Assert.That(result.ResponsibilityTasks.FirstOrDefault().Id, Is.EqualTo(_entity.Object.ResponsibilityTasks.FirstOrDefault().Id));
        }
        public void Given_Responsibility_When_Map_Then_map_StatusDerivedFromTasks()
        {
            // Given

            // When
            var result = new ResponsibilityDtoMapper(_entity.Object).WithTasks().Map();

            //Then
            Assert.That(result.StatusDerivedFromTasks, Is.EqualTo(_status));
        }
        public void Given_a_responsibility_When_Map_Then_Return_ResponsibilityTaskDto()
        {
            //Given

            //When
            var result = new ResponsibilityDtoMapper(_entity.Object).WithTasks().Map();
            
            //Then
            Assert.IsInstanceOf<ResponsibilityTaskDto>(result.ResponsibilityTasks.ElementAt(0));
        }