public void IsNotValid_IfNameNotSpecified()
        {
            var model = new DomainObjectBase( null )
             {
            Id = Guid.NewGuid(),
            Description = "This is a description"
             };

             Assert.IsFalse( model.IsValidFor( TransactionType.All ) );
        }
        public void IsNotValid_IfNameIsTooLong()
        {
            var model = new DomainObjectBase( null )
             {
            Id = Guid.NewGuid(),
            Name = "012345678901234567890123456789012345678901234567890",
            Description = "This is a description"
             };

             Assert.IsFalse( model.IsValidFor( TransactionType.All ) );
        }
        public void IsValid_IfEverythingIsValid()
        {
            var model = new DomainObjectBase( null )
             {
            Id = Guid.NewGuid(),
            Name = "01234567890123456789012345678901234567890123456789",
            Description = "This is a description"
             };

             Assert.IsTrue( model.IsValidFor( TransactionType.All ) );
             var messages = model.GetErrorMessages();
             Assert.AreEqual( 0, messages.Count );
        }