예제 #1
0
        public void MapToFileEntity_WithValidTest_MapsAssignments()
        {
            // Arrange
            var input = new TestUtilities.Application.TestBuilder()
                        .WithValidMinimumGrade()
                        .WithNumberOfVersions(1)
                        .WithRandomAssignments()
                        .Build();

            // Act
            FileEntity.Test result = input.MapToFileEntity();

            // Assert
            result.Assignments.Should().HaveCount(input.Assignments.Count);
            foreach (var assignment in input.Assignments)
            {
                result.Assignments.Should().Contain(x => x.Id == assignment.Id);
            }
        }
예제 #2
0
        public void MapToFileEntity_WithValidTest_MapsTestProperties()
        {
            // Arrange
            var input = new TestUtilities.Application.TestBuilder()
                        .WithValidMinimumGrade()
                        .WithNumberOfVersions(1)
                        .WithRandomAssignments()
                        .Build();

            // Act
            FileEntity.Test result = input.MapToFileEntity();

            // Assert
            result.Id.Should().Be(input.Id);
            result.Name.Should().Be(input.Name.Value);
            result.MinimumGrade.Should().Be(input.MinimumGrade.Value);
            result.StandardizationFactor.Should().Be(input.StandardizationFactor.Value);
            result.NumberOfVersions.Should().Be(input.NumberOfVersions);
        }