Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs =================================================================== diff -u -r883c1c27b5590d21a05a293a74206dc45e203cee -r9f1e95f305bbc982a11f7a8917a95bf6caa18544 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs (.../AssessmentSectionCommentViewTest.cs) (revision 883c1c27b5590d21a05a293a74206dc45e203cee) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs (.../AssessmentSectionCommentViewTest.cs) (revision 9f1e95f305bbc982a11f7a8917a95bf6caa18544) @@ -79,22 +79,34 @@ } [Test] + [RequiresSTA] public void Data_AssessmentSectionContainsComment_CommentSetOnRichTextEditor() { // Setup - var expectedText = ""; + var expectedText = ""; var mocks = new MockRepository(); var view = new AssessmentSectionCommentView(); - var data = mocks.StrictMock(); - data.Expect(d => d.Comments).Return(expectedText); + var data = mocks.Stub(); + data.Comments = GetValidRtfString(expectedText); mocks.ReplayAll(); // Call view.Data = data; // Assert - Assert.AreEqual(expectedText, view.Controls[0].Text); + var textBoxControl = view.Controls[0].Controls[0]; + Assert.AreEqual(expectedText, textBoxControl.Text); } + + private static string GetValidRtfString(string value) + { + RichTextBox richTextBox = new RichTextBox + { + Text = value + }; + + return richTextBox.Rtf; + } } } \ No newline at end of file