diff --git a/sample/Tests/ModuleZeroSampleProject.Tests/packages.config b/sample/Tests/ModuleZeroSampleProject.Tests/packages.config new file mode 100644 index 00000000..a0354d65 --- /dev/null +++ b/sample/Tests/ModuleZeroSampleProject.Tests/packages.config @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Abp.Zero.sln b/src/Abp.Zero.sln index 7a39298f..03bc4b93 100644 --- a/src/Abp.Zero.sln +++ b/src/Abp.Zero.sln @@ -23,10 +23,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Doc", "Doc", "{8633A076-A52 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{34AA52E9-B75E-46EF-AEBB-460AED9A0767}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.Zero.SampleApp.Tests", "Tests\Abp.Zero.Tests\Abp.Zero.SampleApp.Tests.csproj", "{3C90D572-EA4E-499C-AF95-407BFA8A36B8}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.Zero.SampleApp", "Tests\Abp.Zero.SampleApp\Abp.Zero.SampleApp.csproj", "{59AA0119-F76E-433F-B9D1-385F51A13A17}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.Zero.SampleApp.Tests", "Tests\Abp.Zero.SampleApp.Tests\Abp.Zero.SampleApp.Tests.csproj", "{3C90D572-EA4E-499C-AF95-407BFA8A36B8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -45,20 +45,20 @@ Global {C43A88EE-1537-40BB-8154-4271E6AAD919}.Debug|Any CPU.Build.0 = Debug|Any CPU {C43A88EE-1537-40BB-8154-4271E6AAD919}.Release|Any CPU.ActiveCfg = Release|Any CPU {C43A88EE-1537-40BB-8154-4271E6AAD919}.Release|Any CPU.Build.0 = Release|Any CPU - {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Release|Any CPU.Build.0 = Release|Any CPU {59AA0119-F76E-433F-B9D1-385F51A13A17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59AA0119-F76E-433F-B9D1-385F51A13A17}.Debug|Any CPU.Build.0 = Debug|Any CPU {59AA0119-F76E-433F-B9D1-385F51A13A17}.Release|Any CPU.ActiveCfg = Release|Any CPU {59AA0119-F76E-433F-B9D1-385F51A13A17}.Release|Any CPU.Build.0 = Release|Any CPU + {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C90D572-EA4E-499C-AF95-407BFA8A36B8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {3C90D572-EA4E-499C-AF95-407BFA8A36B8} = {34AA52E9-B75E-46EF-AEBB-460AED9A0767} {59AA0119-F76E-433F-B9D1-385F51A13A17} = {34AA52E9-B75E-46EF-AEBB-460AED9A0767} + {3C90D572-EA4E-499C-AF95-407BFA8A36B8} = {34AA52E9-B75E-46EF-AEBB-460AED9A0767} EndGlobalSection EndGlobal diff --git a/src/Tests/Abp.Zero.Tests/Abp.Zero.SampleApp.Tests.csproj b/src/Tests/Abp.Zero.SampleApp.Tests/Abp.Zero.SampleApp.Tests.csproj similarity index 98% rename from src/Tests/Abp.Zero.Tests/Abp.Zero.SampleApp.Tests.csproj rename to src/Tests/Abp.Zero.SampleApp.Tests/Abp.Zero.SampleApp.Tests.csproj index c8b445dd..9fb30b16 100644 --- a/src/Tests/Abp.Zero.Tests/Abp.Zero.SampleApp.Tests.csproj +++ b/src/Tests/Abp.Zero.SampleApp.Tests/Abp.Zero.SampleApp.Tests.csproj @@ -110,13 +110,14 @@ - - + + Designer + diff --git a/src/Tests/Abp.Zero.Tests/App.config b/src/Tests/Abp.Zero.SampleApp.Tests/App.config similarity index 100% rename from src/Tests/Abp.Zero.Tests/App.config rename to src/Tests/Abp.Zero.SampleApp.Tests/App.config diff --git a/src/Tests/Abp.Zero.Tests/Properties/AssemblyInfo.cs b/src/Tests/Abp.Zero.SampleApp.Tests/Properties/AssemblyInfo.cs similarity index 100% rename from src/Tests/Abp.Zero.Tests/Properties/AssemblyInfo.cs rename to src/Tests/Abp.Zero.SampleApp.Tests/Properties/AssemblyInfo.cs diff --git a/src/Tests/Abp.Zero.Tests/Roles/RoleManager_Tests.cs b/src/Tests/Abp.Zero.SampleApp.Tests/Roles/RoleManager_Tests.cs similarity index 100% rename from src/Tests/Abp.Zero.Tests/Roles/RoleManager_Tests.cs rename to src/Tests/Abp.Zero.SampleApp.Tests/Roles/RoleManager_Tests.cs diff --git a/src/Tests/Abp.Zero.Tests/SampleAppTestBase.cs b/src/Tests/Abp.Zero.SampleApp.Tests/SampleAppTestBase.cs similarity index 100% rename from src/Tests/Abp.Zero.Tests/SampleAppTestBase.cs rename to src/Tests/Abp.Zero.SampleApp.Tests/SampleAppTestBase.cs diff --git a/src/Tests/Abp.Zero.Tests/Users/UserRepository_Tests.cs b/src/Tests/Abp.Zero.SampleApp.Tests/Users/UserRepository_Tests.cs similarity index 100% rename from src/Tests/Abp.Zero.Tests/Users/UserRepository_Tests.cs rename to src/Tests/Abp.Zero.SampleApp.Tests/Users/UserRepository_Tests.cs diff --git a/src/Tests/Abp.Zero.Tests/packages.config b/src/Tests/Abp.Zero.SampleApp.Tests/packages.config similarity index 100% rename from src/Tests/Abp.Zero.Tests/packages.config rename to src/Tests/Abp.Zero.SampleApp.Tests/packages.config diff --git a/src/Tests/Abp.Zero.Tests/TestAuthorizationProvider.cs b/src/Tests/Abp.Zero.Tests/TestAuthorizationProvider.cs deleted file mode 100644 index 4b35c0ac..00000000 --- a/src/Tests/Abp.Zero.Tests/TestAuthorizationProvider.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Abp.Authorization; -using Abp.Localization; - -namespace Abp.Zero.SampleApp.Tests -{ - public class TestAuthorizationProvider : AuthorizationProvider - { - public override void SetPermissions(IPermissionDefinitionContext context) - { - context.CreatePermission("Permission1", new FixedLocalizableString("Permission1")); - context.CreatePermission("Permission2", new FixedLocalizableString("Permission2")); - context.CreatePermission("Permission3", new FixedLocalizableString("Permission3"), true); - context.CreatePermission("Permission4", new FixedLocalizableString("Permission4"), true); - } - } -} diff --git a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.Designer.cs b/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.Designer.cs deleted file mode 100644 index a47d94dd..00000000 --- a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.Designer.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -namespace ConsoleTester.Migrations -{ - using System.CodeDom.Compiler; - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - using System.Resources; - - [GeneratedCode("EntityFramework.Migrations", "6.1.1-30610")] - public sealed partial class InitialCreate : IMigrationMetadata - { - private readonly ResourceManager Resources = new ResourceManager(typeof(InitialCreate)); - - string IMigrationMetadata.Id - { - get { return "201411112016541_InitialCreate"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return Resources.GetString("Target"); } - } - } -} diff --git a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.cs b/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.cs deleted file mode 100644 index 06bf884f..00000000 --- a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.cs +++ /dev/null @@ -1,211 +0,0 @@ -namespace ConsoleTester.Migrations -{ - using System; - using System.Collections.Generic; - using System.Data.Entity.Infrastructure.Annotations; - using System.Data.Entity.Migrations; - - public partial class InitialCreate : DbMigration - { - public override void Up() - { - CreateTable( - "dbo.MyEntities", - c => new - { - Id = c.Int(nullable: false, identity: true), - MyEntityProp = c.String(), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "dbo.AbpPermissions", - c => new - { - Id = c.Long(nullable: false, identity: true), - Name = c.String(nullable: false, maxLength: 128), - IsGranted = c.Boolean(nullable: false), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - RoleId = c.Int(), - UserId = c.Long(), - Discriminator = c.String(nullable: false, maxLength: 128), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.UserId, cascadeDelete: true) - .ForeignKey("dbo.AbpRoles", t => t.RoleId, cascadeDelete: true) - .Index(t => t.RoleId) - .Index(t => t.UserId); - - CreateTable( - "dbo.AbpRoles", - c => new - { - Id = c.Int(nullable: false, identity: true), - TenantId = c.Int(), - Name = c.String(), - DisplayName = c.String(), - LastModificationTime = c.DateTime(), - LastModifierUserId = c.Long(), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.CreatorUserId) - .ForeignKey("dbo.AbpUsers", t => t.LastModifierUserId) - .ForeignKey("dbo.AbpTenants", t => t.TenantId) - .Index(t => t.TenantId) - .Index(t => t.LastModifierUserId) - .Index(t => t.CreatorUserId); - - CreateTable( - "dbo.AbpUsers", - c => new - { - Id = c.Long(nullable: false, identity: true), - TenantId = c.Int(), - Name = c.String(nullable: false, maxLength: 30), - Surname = c.String(nullable: false, maxLength: 30), - UserName = c.String(nullable: false, maxLength: 32), - Password = c.String(nullable: false, maxLength: 100), - EmailAddress = c.String(nullable: false, maxLength: 100), - IsEmailConfirmed = c.Boolean(nullable: false), - EmailConfirmationCode = c.String(maxLength: 16), - PasswordResetCode = c.String(maxLength: 32), - LastLoginTime = c.DateTime(), - IsDeleted = c.Boolean(nullable: false), - DeleterUserId = c.Long(), - DeletionTime = c.DateTime(), - LastModificationTime = c.DateTime(), - LastModifierUserId = c.Long(), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - }, - annotations: new Dictionary - { - { "Abp_SoftDelete", "True" }, - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.CreatorUserId) - .ForeignKey("dbo.AbpUsers", t => t.DeleterUserId) - .ForeignKey("dbo.AbpUsers", t => t.LastModifierUserId) - .ForeignKey("dbo.AbpTenants", t => t.TenantId) - .Index(t => t.TenantId) - .Index(t => t.DeleterUserId) - .Index(t => t.LastModifierUserId) - .Index(t => t.CreatorUserId); - - CreateTable( - "dbo.AbpUserLogins", - c => new - { - Id = c.Long(nullable: false, identity: true), - UserId = c.Long(nullable: false), - LoginProvider = c.String(), - ProviderKey = c.String(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.UserId, cascadeDelete: true) - .Index(t => t.UserId); - - CreateTable( - "dbo.AbpUserRoles", - c => new - { - Id = c.Long(nullable: false, identity: true), - UserId = c.Long(nullable: false), - RoleId = c.Int(nullable: false), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.UserId, cascadeDelete: true) - .Index(t => t.UserId); - - CreateTable( - "dbo.AbpSettings", - c => new - { - Id = c.Long(nullable: false, identity: true), - TenantId = c.Int(), - UserId = c.Long(), - Name = c.String(), - Value = c.String(), - LastModificationTime = c.DateTime(), - LastModifierUserId = c.Long(), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.UserId) - .ForeignKey("dbo.AbpTenants", t => t.TenantId) - .Index(t => t.TenantId) - .Index(t => t.UserId); - - CreateTable( - "dbo.AbpTenants", - c => new - { - Id = c.Int(nullable: false, identity: true), - TenancyName = c.String(), - Name = c.String(), - LastModificationTime = c.DateTime(), - LastModifierUserId = c.Long(), - CreationTime = c.DateTime(nullable: false), - CreatorUserId = c.Long(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.AbpUsers", t => t.CreatorUserId) - .ForeignKey("dbo.AbpUsers", t => t.LastModifierUserId) - .Index(t => t.LastModifierUserId) - .Index(t => t.CreatorUserId); - - } - - public override void Down() - { - DropForeignKey("dbo.AbpRoles", "TenantId", "dbo.AbpTenants"); - DropForeignKey("dbo.AbpPermissions", "RoleId", "dbo.AbpRoles"); - DropForeignKey("dbo.AbpRoles", "LastModifierUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpRoles", "CreatorUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUsers", "TenantId", "dbo.AbpTenants"); - DropForeignKey("dbo.AbpSettings", "TenantId", "dbo.AbpTenants"); - DropForeignKey("dbo.AbpTenants", "LastModifierUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpTenants", "CreatorUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpSettings", "UserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUserRoles", "UserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpPermissions", "UserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUserLogins", "UserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUsers", "LastModifierUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUsers", "DeleterUserId", "dbo.AbpUsers"); - DropForeignKey("dbo.AbpUsers", "CreatorUserId", "dbo.AbpUsers"); - DropIndex("dbo.AbpTenants", new[] { "CreatorUserId" }); - DropIndex("dbo.AbpTenants", new[] { "LastModifierUserId" }); - DropIndex("dbo.AbpSettings", new[] { "UserId" }); - DropIndex("dbo.AbpSettings", new[] { "TenantId" }); - DropIndex("dbo.AbpUserRoles", new[] { "UserId" }); - DropIndex("dbo.AbpUserLogins", new[] { "UserId" }); - DropIndex("dbo.AbpUsers", new[] { "CreatorUserId" }); - DropIndex("dbo.AbpUsers", new[] { "LastModifierUserId" }); - DropIndex("dbo.AbpUsers", new[] { "DeleterUserId" }); - DropIndex("dbo.AbpUsers", new[] { "TenantId" }); - DropIndex("dbo.AbpRoles", new[] { "CreatorUserId" }); - DropIndex("dbo.AbpRoles", new[] { "LastModifierUserId" }); - DropIndex("dbo.AbpRoles", new[] { "TenantId" }); - DropIndex("dbo.AbpPermissions", new[] { "UserId" }); - DropIndex("dbo.AbpPermissions", new[] { "RoleId" }); - DropTable("dbo.AbpTenants"); - DropTable("dbo.AbpSettings"); - DropTable("dbo.AbpUserRoles"); - DropTable("dbo.AbpUserLogins"); - DropTable("dbo.AbpUsers", - removedAnnotations: new Dictionary - { - { "Abp_SoftDelete", "True" }, - }); - DropTable("dbo.AbpRoles"); - DropTable("dbo.AbpPermissions"); - DropTable("dbo.MyEntities"); - } - } -} diff --git a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.resx b/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.resx deleted file mode 100644 index e39095bd..00000000 --- a/src/Tests/ConsoleTester/Migrations/201411112016541_InitialCreate.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - H4sIAAAAAAAEAO0dXW/ktvG9QP+DsE9Jcdm1fUGQHtYJHPsuMHI+G7dOUPTlQEv0nlCttJW0V7tFf1kf+pP6F0rqkx9DitTX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3ZH0PrJ9MQN2c/82p4vaZS6mI6whHezx4mVFdp5c727+g3BlEXjbXEYMIjHwVhcUFKD1oAWq4eDNZQQJeE0xI4eQhYMG4sActLZo3GFMUEvjaf8/mCKQlXoZuOBiNYJFjrQ+OlwGwgIjLB81v5eX4ae43bXOiHVnfC+sns/Owy1fWPT/Z+IregisjqvoDyDjWF8uNVMbBMdtYqRxK9rA+NLtksr8Ac93YVJ/Ccm4QTvbI8v5YPpllXB8215ZdL90vZMzfvfiFVOEJJpNeqy/DYEzVMZ5hYCxcE0iVJQc1FnnFZ0uq813Vp9hSKqz89er5zHuICHfzg3A2i5YkD3wfgBKQOgPqQL1ePGzvNKG7xZ5z8ZM6yz8r4IOBtsFsV8qEWwrItNAMcnEGA4IvyjR9KHLfQB0pCFQXaboxI5Sa5U2MViZrELsoVZXUQ1mg6EAVEX2shGBSSH5Ab0Dnuw2tppHsa2KDGyqR19SG2UNqLvshcepKiEnW08Dues3AZTdE5fqliN3c05AL/doh25Y9J9n1gI8R1tOgdBmDNIdTHYcG8a0/bg2QNst+iPwiyAbn6W2AwyTDmuRQdWJqm9jKANERhZX1E7fOW9VuYEac3n9uKnuBlLRmTxoT9v31kHNqYkNsWNz1rjB7NPe8uLMOmdbZotrNwK5ctMgIJcfKWi4+7kJ6sz//dYUTf12DoJklQuxyXo6qznX4GJXuFgGjsooYoQmnyEMpuohT/xG5KSl2MWEk5WCRueLt5gF71+HtLt3uUjJkvHkIuOiw1Gmj6z9Le8XjvLzd0l9JH0MgaPr0McRt+NPOD7wK73dAbBsFCOoNKp7LUF6m9NnM+rmC9CEKDQEV5KucWPd4sw0IsOQ2XKEvuA1uROW8x2vkPtdPXlVAmhnBk3155aN1jDZJAaNuT34SGfY2Tz/8H1cVmyRjyQAA - - - dbo - - \ No newline at end of file diff --git a/src/Tests/ConsoleTester/Migrations/Configuration.cs b/src/Tests/ConsoleTester/Migrations/Configuration.cs deleted file mode 100644 index 396d80f9..00000000 --- a/src/Tests/ConsoleTester/Migrations/Configuration.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Abp.Authorization.Users; -using Abp.MultiTenancy; - -namespace ConsoleTester.Migrations -{ - using System; - using System.Data.Entity; - using System.Data.Entity.Migrations; - using System.Linq; - - internal sealed class Configuration : DbMigrationsConfiguration - { - public Configuration() - { - AutomaticMigrationsEnabled = false; - } - - protected override void Seed(ConsoleTester.MyDbContext context) - { - //Admin role for tenancy owner - - var adminRoleForTenancyOwner = context.Roles.FirstOrDefault(r => r.TenantId == null && r.Name == "Admin"); - if (adminRoleForTenancyOwner == null) - { - adminRoleForTenancyOwner = context.Roles.Add(new Role(null, "Admin", "Admin")); - context.SaveChanges(); - } - - //Admin user for tenancy owner - - var adminUserForTenancyOwner = context.Users.FirstOrDefault(u => u.TenantId == null && u.UserName == "admin"); - if (adminUserForTenancyOwner == null) - { - adminUserForTenancyOwner = context.Users.Add( - new User - { - TenantId = null, - UserName = "admin", - Name = "System", - Surname = "Administrator", - EmailAddress = "admin@aspnetboilerplate.com", - IsEmailConfirmed = true, - Password = "AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==" //123qwe - }); - - context.SaveChanges(); - - context.UserRoles.Add(new UserRole(adminUserForTenancyOwner.Id, adminRoleForTenancyOwner.Id)); - - context.SaveChanges(); - } - - //Default tenant - - var defaultTenant = context.Tenants.FirstOrDefault(t => t.TenancyName == "Default"); - if (defaultTenant == null) - { - defaultTenant = context.Tenants.Add(new Tenant("Default", "Default")); - context.SaveChanges(); - } - - //Admin role for 'Default' tenant (above code does not works for this case) - - var adminRoleForDefaultTenant = context.Roles.FirstOrDefault(r => r.TenantId == defaultTenant.Id && r.Name == "Admin"); - if (adminRoleForDefaultTenant == null) - { - adminRoleForDefaultTenant = context.Roles.Add(new Role(defaultTenant.Id, "Admin", "Admin")); - context.SaveChanges(); - } - - //Admin user for 'Default' tenant (above code does not works for this case) - - var adminUserForDefaultTenant = context.Users.FirstOrDefault(u => u.TenantId == defaultTenant.Id && u.UserName == "admin"); - if (adminUserForDefaultTenant == null) - { - adminUserForDefaultTenant = context.Users.Add( - new User - { - Tenant = defaultTenant, - UserName = "admin", - Name = "System", - Surname = "Administrator", - EmailAddress = "admin@aspnetboilerplate.com", - IsEmailConfirmed = true, - Password = "AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==" //123qwe - }); - context.SaveChanges(); - - context.UserRoles.Add(new UserRole(adminUserForDefaultTenant.Id, adminRoleForDefaultTenant.Id)); - context.SaveChanges(); - } - - } - } -} diff --git a/src/Tests/ConsoleTester/Program.cs b/src/Tests/ConsoleTester/Program.cs deleted file mode 100644 index 3321ae91..00000000 --- a/src/Tests/ConsoleTester/Program.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Configuration; -using System.Data.Entity; -using System.Reflection; -using Abp; -using Abp.Authorization.Roles; -using Abp.Authorization.Users; -using Abp.Dependency; -using Abp.Domain.Entities; -using Abp.Domain.Repositories; -using Abp.Domain.Uow; -using Abp.Modules; -using Abp.MultiTenancy; -using Abp.Runtime.Session; -using Abp.Zero.EntityFramework; - -namespace ConsoleTester -{ - class Program - { - static void Main(string[] args) - { - //Console.WriteLine(ConfigurationManager.ConnectionStrings["Default"].ConnectionString); - //Console.ReadLine(); - //Test(); - } - - private static void Test() - { - using (var bootstrapper = new AbpBootstrapper()) - { - bootstrapper.Initialize(); - - var tester = IocManager.Instance.Resolve(); - tester.DoTests(); - - Console.WriteLine("Press enter to stop application..."); - Console.ReadLine(); - } - } - } - - [DependsOn(typeof(AbpZeroEntityFrameworkModule))] - public class MyModule : AbpModule - { - public override void Initialize() - { - IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()); - } - } - - public class Tester : ITransientDependency - { - private readonly IRepository _userRepository; - private readonly MyUserStore _userStore; - private readonly IRepository _myEntityRepository; - - public Tester(IRepository userRepository, MyUserStore userStore, IRepository myEntityRepository) - { - _userRepository = userRepository; - _userStore = userStore; - _myEntityRepository = myEntityRepository; - } - - public void DoTests() - { - foreach (var user in _userRepository.GetAllList()) - { - Console.WriteLine(user); - } - } - } - - public class MyDbContext : AbpZeroDbContext - { - public IDbSet MyEntities { get; set; } - - public MyDbContext() - : base(ConfigurationManager.ConnectionStrings["Default"].ConnectionString) - { - - } - } - - public class Tenant : AbpTenant - { - protected Tenant() - { - - } - - public Tenant(string tenancyName, string name) - : base(tenancyName, name) - { - } - } - - public class User : AbpUser - { - public override string ToString() - { - return string.Format("[User {0}] {1}", Id, UserName); - } - } - - public class Role : AbpRole - { - protected Role() - - { - - } - - public Role(int? tenantId, string name, string displayName) - : base(tenantId, name, displayName) - { - - } - } - - public class MyEntity : Entity - { - public string MyEntityProp { get; set; } - } - - public class MyUserManager : AbpUserManager - { - public MyUserManager(MyUserStore userStore, ) - : base(userStore,) - { - } - } - - public class MyUserStore : AbpUserStore - { - public MyUserStore( - IRepository userRepository, - IRepository userLoginRepository, - IRepository userRoleRepository, - IRepository roleRepository, - IAbpSession session, - IUnitOfWorkManager unitOfWorkManager) - : base( - userRepository, - userLoginRepository, - userRoleRepository, - roleRepository, - session, - unitOfWorkManager) - { - } - } -} diff --git a/src/Tests/ConsoleTester/packages.config b/src/Tests/ConsoleTester/packages.config deleted file mode 100644 index 3e160012..00000000 --- a/src/Tests/ConsoleTester/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file