Example #1
0
        public void GivenValidIPermissionFactory_WhenSetCurrent_ThenCurrentIPermissionFactoryIsSetToPassedInIPermissionFactory()
        {
            IPermissionFactory expected = MockRepository.GenerateMock<IPermissionFactory>();

            PermissionFactory.SetCurrent(expected);

            Assert.AreEqual(expected, PermissionFactory.Current);
        }
Example #2
0
 public void GivenNullIPermissionFactory_WhenSetCurrent_ThenArgumentNullException()
 {
     TestExtensions.ExpectException<ArgumentNullException>(() => PermissionFactory.SetCurrent(null));
 }