Exemplo n.º 1
0
        private static ProfileProvider GetProfileProvider(IUserRepository userRepository)
        {
            var userRepositoryManager = A.Fake <IUserRepositoryManager>();

            A.CallTo(() => userRepositoryManager.GetRepository("MyRepository")).Returns(userRepository);
            var profileProvider = new ProfileProvider(userRepositoryManager);
            var nameValues      = new NameValueCollection();

            nameValues.Add("userRepository", "MyRepository");
            nameValues.Add("applicationName", "MyApplication");
            profileProvider.Initialize("MyProvider", nameValues);
            return(profileProvider);
        }
Exemplo n.º 2
0
        public void Initialize_PassingNullConfig_ThrowsArgumentNullException()
        {
            var profileProvider = new ProfileProvider();

            Assert.Throws <ArgumentNullException>(() => profileProvider.Initialize("provider", null));
        }