/// <summary>
        /// Create user with userName
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public AspNetUser CreateUser(string userName, IdType idType = IdType.Integer)
        {
            var userId = string.Empty;

            switch (idType)
            {
                case IdType.Guid:
                    userId = Guid.NewGuid().ToString();
                    break;
                case IdType.Integer:
                default:
                    userId = GetNextId().ToString();
                    break;
            }

            AspNetUser user = new AspNetUser();
            user.Id = userId;
            user.FirstName = "Test";
            user.Surname = "LastName";
            user.Email = userName;
            user.EmailConfirmed = true;
            user.UserName = userName;
            model.AspNetUsers.Add(user);
            return user;
        }
        public DatabaseWrapper()
        {
            // Create test user(context auditing requires a valid user id)
            var userId = string.Empty;
            using (var model = new Entities())
            {
                var testUserName = "******";
                var testUser = model.AspNetUsers.FirstOrDefault(u => u.UserName == testUserName);

                if (testUser == null)
                {
                    testUser = new AspNetUser
                    {
                        Id = Guid.NewGuid().ToString(),
                        FirstName = "Test",
                        Surname = "LastName",
                        Email = "[email protected]",
                        EmailConfirmed = true,
                        UserName = testUserName
                    };

                    model.AspNetUsers.Add(testUser);
                    model.SaveChanges();
                }

                userId = testUser.Id;
            }

            transactionScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled);

            Model = new Entities();

            IUserContext userContext = A.Fake<IUserContext>();
            A.CallTo(() => userContext.UserId)
                .ReturnsLazily(() => Guid.Parse(userId));

            IEventDispatcher eventDispatcher = A.Fake<IEventDispatcher>();

            WeeeContext = new WeeeContext(userContext, eventDispatcher);

            StoredProcedures = new StoredProcedures(WeeeContext);
        }