public void SetStudentGroupSingleGroup() { // Arrange var actual = new List <Student> { new Student() { GroupId = 0, Name = "Paul", TimeIndex = 0, MarkIndex = 1 }, new Student() { GroupId = 0, Name = "Fred", TimeIndex = 1, MarkIndex = 0 }, new Student() { GroupId = 0, Name = "John", TimeIndex = 2, MarkIndex = 1 } }; var expected = new List <Student> { new Student() { GroupId = 1, Name = "Paul", TimeIndex = 0, MarkIndex = 1 }, new Student() { GroupId = 1, Name = "Fred", TimeIndex = 1, MarkIndex = 0 }, new Student() { GroupId = 1, Name = "John", TimeIndex = 2, MarkIndex = 1 } }; // Act var logger = new Logger(); var studentCore = new StudentCore(logger); studentCore.SetStudentGroups(actual); // Assert CollectionAssert.AreEqual(expected, actual, new StudentComparer()); }