public static PartnerEntity CreateTestPartner(this BusinessIntegrationTestBase testBase)
        {
            var p = new PartnerEntity {
                Name = ShortStringGenerator.GetRandomValue()
            };

            return(p);
        }
        public static UserEntity CreateTestUser(this BusinessIntegrationTestBase testBase)
        {
            var u = new UserEntity
            {
                Name  = ShortStringGenerator.GetRandomValue(),
                Email = ShortStringGenerator.GetRandomValue(),
            };

            var r = CreateTestRole(testBase);

            u.Role = r;

            return(u);
        }
        public static RoleEntity CreateTestRole(this BusinessIntegrationTestBase testBase)
        {
            var role = new RoleEntity {
                Name = ShortStringGenerator.GetRandomValue(),
            };

            role.Permissions = new Collection <PermissionEntity>
            {
                new PermissionEntity
                {
                    Name = AccessRight.Admin,
                    Role = role
                }
            };

            return(role);
        }