Exemplo n.º 1
0
        public void SetErrorRaisesPropertyChangeNotification()
        {
            var sut = new EditorComponentVM <string>();

            const string error = "error";

            // act
            sut.MonitorEvents();
            sut.SetError(error);

            // assert
            sut.ShouldRaisePropertyChangeFor(x => x.Value);
        }
Exemplo n.º 2
0
        public void SetValueRaisesPropertyChangeNotification()
        {
            var sut         = new EditorComponentVM <string>();
            var implicitSut = (IEditorComponent <string>)sut;

            const string sample = "sample";

            // act
            sut.MonitorEvents();
            implicitSut.SetValue(sample);

            // assert
            sut.ShouldRaisePropertyChangeFor(x => x.Value);
        }