Blog.Common.Web.Tests.Attributes.ValidateUsernameAttributeTest.ShouldReturnFalseWhenParameterIsNull C# (CSharp) Méthode

ShouldReturnFalseWhenParameterIsNull() private méthode

private ShouldReturnFalseWhenParameterIsNull ( ) : void
Résultat void
        public void ShouldReturnFalseWhenParameterIsNull()
        {
            var attr = new ValidateUsernameAttribute { UsersResource = _userResource.Object };
            var result = attr.IsValid(null);

            Assert.IsFalse(result);
            Assert.AreEqual("Model property is null/empty.", attr.ErrorMessage);
        }