Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs =================================================================== diff -u -r504f726111ede24adc838a345fdcd1c47227c79b -r883c1c27b5590d21a05a293a74206dc45e203cee --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs (.../AssessmentSectionCommentViewTest.cs) (revision 504f726111ede24adc838a345fdcd1c47227c79b) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssessmentSectionCommentViewTest.cs (.../AssessmentSectionCommentViewTest.cs) (revision 883c1c27b5590d21a05a293a74206dc45e203cee) @@ -20,6 +20,7 @@ // All rights reserved. using System.Windows.Forms; +using Core.Common.Controls.TextEditor; using Core.Common.Controls.Views; using NUnit.Framework; using Rhino.Mocks; @@ -41,16 +42,18 @@ Assert.IsInstanceOf(view); Assert.IsInstanceOf(view); Assert.IsNull(view.Data); + Assert.AreEqual(1, view.Controls.Count); + var control = view.Controls[0]; + Assert.IsInstanceOf(control); } - [Test] public void Data_AssessmentSection_DataSet() { // Setup var mocks = new MockRepository(); var view = new AssessmentSectionCommentView(); - var data = mocks.StrictMock(); + var data = mocks.Stub(); mocks.ReplayAll(); @@ -74,5 +77,24 @@ // Assert Assert.IsNull(view.Data); } + + [Test] + public void Data_AssessmentSectionContainsComment_CommentSetOnRichTextEditor() + { + // Setup + var expectedText = ""; + var mocks = new MockRepository(); + var view = new AssessmentSectionCommentView(); + var data = mocks.StrictMock(); + data.Expect(d => d.Comments).Return(expectedText); + + mocks.ReplayAll(); + + // Call + view.Data = data; + + // Assert + Assert.AreEqual(expectedText, view.Controls[0].Text); + } } -} +} \ No newline at end of file