public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("AccountNumber", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)10)]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Guid", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("IsActive", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Name", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)40)]"
            }));
            expectedFields.Add(new NameAndType("SubAccountNumber", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)5)]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(SubAccount));
        }
Exemplo n.º 2
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Active", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Application", "Catbert4.Core.Domain.Application", new List <string>
            {
                "[NHibernate.Validator.Constraints.NotNullAttribute()]"
            }));
            expectedFields.Add(new NameAndType("ContactEmail", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.EmailAttribute()]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Reason", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Token", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)32, (Int32)32, Message = \"Token must be 32 characters long\")]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(AccessToken));
        }
Exemplo n.º 3
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("AuditAction", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)1)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("AuditDate", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Guid", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("ObjectId", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)50)]"
            }));
            expectedFields.Add(new NameAndType("ObjectName", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)50)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Username", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)256)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Audit));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("IsAdmin", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("IsDefaultForAccount", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("IsFullFeatured", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("ParentWorkgroup", "Purchasing.Core.Domain.Workgroup", new List <string>()));
            expectedFields.Add(new NameAndType("Role", "Purchasing.Core.Domain.Role", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Workgroup", "Purchasing.Core.Domain.Workgroup", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(WorkgroupPermission));
        }
Exemplo n.º 5
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Amount", "System.Decimal", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayFormatAttribute(DataFormatString = \"{0:C}\")]",
                "[System.ComponentModel.DataAnnotations.RangeAttribute((Int32)0, (Int32)1000000)]",
                "[System.ComponentModel.DataAnnotations.Schema.ColumnAttribute(TypeName = \"decimal(18,2)\")]",
            }));
            expectedFields.Add(new NameAndType("Description", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.KeyAttribute()]",
            }));
            expectedFields.Add(new NameAndType("Quantity", "System.Decimal", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RangeAttribute((Int32)0, (Int32)1000000)]",
                "[System.ComponentModel.DataAnnotations.Schema.ColumnAttribute(TypeName = \"decimal(18,2)\")]",
            }));

            expectedFields.Add(new NameAndType("TaxExempt", "System.Boolean", new List <string>
            {
            }));
            expectedFields.Add(new NameAndType("Total", "System.Decimal", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayFormatAttribute(DataFormatString = \"{0:C}\")]",
                "[System.ComponentModel.DataAnnotations.RangeAttribute((Int32)0, (Int32)1000000)]",
                "[System.ComponentModel.DataAnnotations.Schema.ColumnAttribute(TypeName = \"decimal(18,2)\")]",
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(LineItem));
        }
Exemplo n.º 6
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Active", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Application", "Catbert4.Core.Domain.Application", new List <string>()));
            expectedFields.Add(new NameAndType("BeginDisplayDate", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("Critical", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("EndDisplayDate", "System.DateTime", new List <string>
            {
                "[NHibernate.Validator.Constraints.FutureAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Text", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DataTypeAttribute((System.ComponentModel.DataAnnotations.DataType)9)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Message));
        }
Exemplo n.º 7
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.KeyAttribute()]",
            }));
            expectedFields.Add(new NameAndType("Role", "Payments.Core.Domain.TeamRole", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = \"Role\")]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
            }));
            expectedFields.Add(new NameAndType("RoleId", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("Team", "Payments.Core.Domain.Team", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = \"Team\")]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
            }));
            expectedFields.Add(new NameAndType("TeamId", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("User", "Payments.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = \"User\")]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
            }));
            expectedFields.Add(new NameAndType("UserId", "System.String", new List <string>()));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(TeamPermission));
        }
Exemplo n.º 8
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Action", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("ActionDateTime", "System.DateTime", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("ActorId", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("ActorName", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.KeyAttribute()]"
            }));
            expectedFields.Add(new NameAndType("JsonDetails", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Notes", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("OrderId", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Status", "System.String", new List <string>()));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(History));
        }
Exemplo n.º 9
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Application", "Catbert4.Core.Domain.Application", new List <string>
            {
                "[NHibernate.Validator.Constraints.NotNullAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Inactive", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Role", "Catbert4.Core.Domain.Role", new List <string>
            {
                "[NHibernate.Validator.Constraints.NotNullAttribute()]"
            }));
            expectedFields.Add(new NameAndType("User", "Catbert4.Core.Domain.User", new List <string>
            {
                "[NHibernate.Validator.Constraints.NotNullAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Permission));
        }
Exemplo n.º 10
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Body", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("CreatedAt", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("FailureCount", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("FailureReason", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("Order", "Anlab.Core.Domain.Order", new List <string>()));
            expectedFields.Add(new NameAndType("SendTo", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Sent", "System.Nullable`1[System.Boolean]", new List <string>()));
            expectedFields.Add(new NameAndType("SentAt", "System.Nullable`1[System.DateTime]", new List <string>()));
            expectedFields.Add(new NameAndType("Subject", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)256)]"
            }));
            expectedFields.Add(new NameAndType("User", "Anlab.Core.Domain.User", new List <string>()));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(MailMessage));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Organization", "Purchasing.Core.Domain.Organization", new List <string>()));
            expectedFields.Add(new NameAndType("PrimaryApprover", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Question", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DataTypeAttribute((System.ComponentModel.DataAnnotations.DataType)9)]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("SecondaryApprover", "Purchasing.Core.Domain.User", new List <string>()));
            expectedFields.Add(new NameAndType("Workgroup", "Purchasing.Core.Domain.Workgroup", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(ConditionalApproval));
        }
Exemplo n.º 12
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Category", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)256)]"
            }));
            expectedFields.Add(new NameAndType("Content", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedAttribute((System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption)0)]"
            }));
            expectedFields.Add(new NameAndType("Title", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)256)]"
            }));


            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(AnalysisMethod));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("DateCreated", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("Description", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Order", "Purchasing.Core.Domain.Order", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("StatusCode", "Purchasing.Core.Domain.OrderStatusCode", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(OrderTracking));
        }
Exemplo n.º 14
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Abbr", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)50)]"
            }));
            expectedFields.Add(new NameAndType("ApplicationRoles", "System.Collections.Generic.IList`1[Catbert4.Core.Domain.ApplicationRole]", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Inactive", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Location", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)256)]",
                "[System.ComponentModel.DataAnnotations.DataTypeAttribute((System.ComponentModel.DataAnnotations.DataType)12)]"
            }));
            expectedFields.Add(new NameAndType("Name", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)50)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Application));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("DateTimeCreated", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("DateTimeSent", "System.Nullable`1[System.DateTime]", new List <string>()));
            expectedFields.Add(new NameAndType("Email", "System.String", new List <string>
            {
                "[DataAnnotationsExtensions.EmailAttribute()]",
                "[System.ComponentModel.DataAnnotations.DataTypeAttribute((System.ComponentModel.DataAnnotations.DataType)10)]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)100)]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Guid", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("NotificationType", "Purchasing.Core.Domain.EmailPreferences+NotificationTypes", new List <string> {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Order", "Purchasing.Core.Domain.Order", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Pending", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Status", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Text", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(EmailQueue));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Account", "Purchasing.Core.Domain.Account", new List <string>()));
            expectedFields.Add(new NameAndType("Equal", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Expiration", "System.Nullable`1[System.DateTime]", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DataTypeAttribute((System.ComponentModel.DataAnnotations.DataType)1)]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("IsActive", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("LessThan", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("MaxAmount", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("TargetUser", "Purchasing.Core.Domain.User", new List <string>()));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(AutoApproval));
        }
Exemplo n.º 17
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("BusinessTypeCode", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)2)]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.String", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Name", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)45)]"
            }));
            expectedFields.Add(new NameAndType("OwnershipCode", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)2)]"
            }));
            expectedFields.Add(new NameAndType("VendorAddresses", "System.Collections.Generic.IList`1[Purchasing.Core.Domain.VendorAddress]", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Vendor));
        }
Exemplo n.º 18
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Account", "Purchasing.Core.Domain.Account", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("AccountManager", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayAttribute(Name = \"Account Manager\")]"
            }));
            expectedFields.Add(new NameAndType("Approver", "Purchasing.Core.Domain.User", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Purchaser", "Purchasing.Core.Domain.User", new List <string>()));
            expectedFields.Add(new NameAndType("Workgroup", "Purchasing.Core.Domain.Workgroup", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(WorkgroupAccount));
        }
Exemplo n.º 19
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Completed", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("IsExternal", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Order", "Purchasing.Core.Domain.Order", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("SecondaryUser", "Purchasing.Core.Domain.User", new List <string>()));
            expectedFields.Add(new NameAndType("Split", "Purchasing.Core.Domain.Split", new List <string>()));
            expectedFields.Add(new NameAndType("StatusCode", "Purchasing.Core.Domain.OrderStatusCode", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>()));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Approval));
        }
Exemplo n.º 20
0
        public void TestTestItemModelFieldsHaveExpectedAttributes()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("AdditionalInfoPrompt", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Analysis", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Categories", "System.String[]", new List <string>()));
            expectedFields.Add(new NameAndType("Category", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Code", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Description", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("ExternalCost", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("ExternalSetupCost", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("Group", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("InternalCost", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("InternalSetupCost", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("LabOrder", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("Notes", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Public", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("RequestOrder", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("Sop", "System.String", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(TestItemModel));
        }
Exemplo n.º 21
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("ContentType", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("IsActive", "System.Boolean", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Enabled\")]",
            }));
            expectedFields.Add(new NameAndType("Team", "Payments.Core.Domain.Team", new List <string>
            {
                "[Newtonsoft.Json.JsonIgnoreAttribute()]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
            }));
            expectedFields.Add(new NameAndType("TeamId", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("TriggerOnPaid", "System.Boolean", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Trigger on Paid\")]",
            }));
            expectedFields.Add(new NameAndType("TriggerOnReconcile", "System.Boolean", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Trigger on Reconcile\")]",
            }));
            expectedFields.Add(new NameAndType("Url", "System.String", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Payload URL\")]",
            }));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(WebHook));
        }
Exemplo n.º 22
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("IsActive", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("IsRequired", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Name", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Organization", "Purchasing.Core.Domain.Organization", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Rank", "System.Int32", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(CustomField));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("DateTimeStamp", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("LineItemId", "System.Nullable`1[System.Int32]", new List <string>()));
            expectedFields.Add(new NameAndType("OrderId", "System.Int32", new List <string>()));
            expectedFields.Add(new NameAndType("SplitId", "System.Nullable`1[System.Int32]", new List <string>()));
            expectedFields.Add(new NameAndType("TrackingMessage", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)500)]"
            }));
            expectedFields.Add(new NameAndType("UserId", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)20)]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(BugTracking));
        }
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("CommentsUpdated", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[Newtonsoft.Json.JsonPropertyAttribute()]",
                "[System.Xml.Serialization.XmlIgnoreAttribute()]"
            }));
            expectedFields.Add(new NameAndType("LineItem", "Purchasing.Core.Domain.LineItem", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("NewReceivedQuantity", "System.Nullable`1[System.Decimal]", new List <string>()));
            expectedFields.Add(new NameAndType("OldReceivedQuantity", "System.Nullable`1[System.Decimal]", new List <string>()));
            expectedFields.Add(new NameAndType("PayInvoice", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("UpdateDate", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("User", "Purchasing.Core.Domain.User", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
            }));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(HistoryReceivedLineItem));
        }
Exemplo n.º 25
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Abbreviation", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)12)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Id", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)2)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("LongDescription", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)50)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("ShortDescription", "System.String", new List <string>
            {
                "[NHibernate.Validator.Constraints.LengthAttribute((Int32)25)]",
                "[UCDArch.Core.NHibernateValidator.Extensions.RequiredAttribute()]"
            }));
            expectedFields.Add(new NameAndType("Units", "System.Collections.Generic.IList`1[Catbert4.Core.Domain.Unit]", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(School));
        }
Exemplo n.º 26
0
        public void TestIDatedEntityFieldsHaveExpectedAttributes()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Created", "System.DateTime", new List <string>()));
            expectedFields.Add(new NameAndType("Updated", "System.DateTime", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(IDatedEntity));
        }
Exemplo n.º 27
0
        public void TestAllFieldsInTheDatabaseHaveBeenTested()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();

            expectedFields.Add(new NameAndType("Account", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RegularExpressionAttribute(\"[A-Z0-9]*\")]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)7)]",
            }));
            expectedFields.Add(new NameAndType("Chart", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)1)]",
            }));
            expectedFields.Add(new NameAndType("Description", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Id", "System.Int32", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.KeyAttribute()]",
            }));
            expectedFields.Add(new NameAndType("IsActive", "System.Boolean", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Active\")]",
            }));
            expectedFields.Add(new NameAndType("IsDefault", "System.Boolean", new List <string>
            {
                "[System.ComponentModel.DisplayNameAttribute(\"Default\")]",
            }));
            expectedFields.Add(new NameAndType("Name", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)128)]",
            }));
            expectedFields.Add(new NameAndType("Project", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayFormatAttribute(NullDisplayText = \"---------\")]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)9)]",
            }));
            expectedFields.Add(new NameAndType("SubAccount", "System.String", new List <string>
            {
                "[System.ComponentModel.DataAnnotations.DisplayFormatAttribute(NullDisplayText = \"-----\")]",
                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)5)]",
            }));
            expectedFields.Add(new NameAndType("Team", "Payments.Core.Domain.Team", new List <string>
            {
                "[Newtonsoft.Json.JsonIgnoreAttribute()]",
                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
            }));
            expectedFields.Add(new NameAndType("TeamId", "System.Int32", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(FinancialAccount));
        }
Exemplo n.º 28
0
        public void TestAccountModelFieldsHaveExpectedAttributes()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("Account", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("Chart", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("SubAccount", "System.String", new List <string>()));

            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(AccountModel));
        }
Exemplo n.º 29
0
        public void TestLabReceiveModelFieldsHaveExpectedAttributes()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("AdjustmentAmount", "System.Decimal", new List <string>()));
            expectedFields.Add(new NameAndType("BypassEmail", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("Confirm", "System.Boolean", new List <string>()));
            expectedFields.Add(new NameAndType("LabComments", "System.String", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(LabReceiveModel));
        }
Exemplo n.º 30
0
        public void TestFinancialSettingsFieldsHaveExpectedAttributes()
        {
            #region Arrange
            var expectedFields = new List <NameAndType>();
            expectedFields.Add(new NameAndType("AnlabAccount", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("CreditObjectCode", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("DebitObjectCode", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("SlothApiKey", "System.String", new List <string>()));
            expectedFields.Add(new NameAndType("SlothApiUrl", "System.String", new List <string>()));
            #endregion Arrange

            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(FinancialSettings));
        }