public void TestUser()
        {
            var adminBuilder = new AdminBuilder("Eric");
            var assemble = new AssembleUser();
            assemble.Construct(adminBuilder);

            IUser adminUser = adminBuilder.User;
            adminUser.Description = "didkasdlkajsldj";
            adminUser.AgencyLicence = Guid.NewGuid();
            adminUser.CompanyFounder = new CompanyFounder
            {
                User = adminUser,
                Company = new Company("SoftCorp", "asdasdasdasd")
            };

            UserManagement adminUserManagement = new UserManagement(adminUser);

            IUser agentUser = new Agent("Taylor");
            agentUser.Description = "asdasdasdasdasd";
            agentUser = adminUserManagement.CreateUser(agentUser, true);

            adminUserManagement.CanSchedulePostsAndCampaings(agentUser);

            Assert.IsTrue(adminUserManagement.CanSchedulePostsAndCampaings(agentUser));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var adminBuilder = new AdminBuilder("Eric");
            var assemble = new AssembleUser();
            assemble.Construct(adminBuilder);

            IUser adminUser = adminBuilder.User;

            UserManagement adminUserManagement = new UserManagement(adminUser);
            IUser agentUser = adminUserManagement.CreateUser(new Agent("Taylor"), true);

            adminUserManagement.CanSchedulePostsAndCampaings(agentUser);

            Console.ReadLine();
        }