示例#1
0
        public void IndexerValidatesPropertyNameWithValidValue()
        {
            var viewModel = new StubViewModel();

            viewModel.RequiredProperty = "Some Value";

            Assert.IsNull(viewModel["RequiredProperty"]);
        }
示例#2
0
        public void IndexerReturnErrorMessageForRequestedInvalidProperty()
        {
            var viewModel = new StubViewModel
            {
                Requiredproperty  = null,
                SomeOtherProperty = null
            };
            var msg = viewModel["SomeOtherProperty"];

            Assert.AreEqual("The SomeOtherProperty field is required.", msg);
        }
        public void IndexerReturnsErrorMessageForRequestedInvalidProperty()
        {
            var viewModel = new StubViewModel
            {
                RequiredProperty  = null,
                SomeOtherProperty = null
            };

            var msg = viewModel["SomeOtherProperty"];

            Assert.AreEqual("SomeOtherProperty 필드가 필요합니다.", msg);
        }
示例#4
0
        public void IndexerReturnsErrorMessageForRequestedInvalidProperty()
        {
            var viewModel = new StubViewModel()
            {
                RequiredProperty  = null,
                SomeOtherProperty = null
            };

            var msg = viewModel["SomeOtherProperty"];

            Assert.AreEqual("El campo SomeOtherProperty es obligatorio.", msg);
        }
示例#5
0
        public void IndexerPropertyValidatesPropertyNameWithInvalidValue()
        {
            var viewModel = new StubViewModel();

            Assert.IsNotNull(viewModel["RequiredProperty"]);
        }
示例#6
0
 public void IDataErrorInfo_ErrorProperty_IsNotSupported()
 {
     var viewModel = new StubViewModel();
     var value     = viewModel.Error;
 }