Beispiel #1
0
        public async Task InsertAssignment_inserts_assignment_to_db()
        {
            var expectedAssignment = new Assignment()
            {
                AssignmentID          = 111,
                AssignmentDescription = "Test description",
                AssignmentName        = "First assignment",
                Priority = Priority.Minor,
                Status   = Status.InProgress,
            };

            await _driver.InsertAssignment(expectedAssignment);

            var actualAssignment = await _myContext.Assignments.FirstOrDefaultAsync(r => r.AssignmentID == 111);

            actualAssignment.AssignmentID.Should().Be(expectedAssignment.AssignmentID);
            actualAssignment.AssignmentDescription.Should().Be(expectedAssignment.AssignmentDescription);
            actualAssignment.AssignmentName.Should().Be(expectedAssignment.AssignmentName);
            actualAssignment.Priority.Should().Be(expectedAssignment.Priority);
            actualAssignment.Status.Should().Be(expectedAssignment.Status);
        }