public UtilityFactory SetupMockUtilityFactory()
        {
            UtilityFactory      utilFactory  = new UtilityFactory(mockData.Context);
            MockSecurityUtility mockSecurity = new MockSecurityUtility(mockData);

            utilFactory.AddOverride <ISecurityUtility>(mockSecurity);
            return(utilFactory);
        }
        private UtilityFactory SetupMockUtilityFactory()
        {
            var            mockAsyncUtility = new MockAsyncUtility(mockData);
            UtilityFactory utilFactory      = new UtilityFactory(this.mockData.Context);

            utilFactory.AddOverride <IAsyncUtility>(mockAsyncUtility);
            return(utilFactory);
        }
示例#3
0
        private T GetManager <T>(AmbientContext context) where T : class
        {
            // replace the AsyncUtility with a mock to avoid usage of queue IFX in tests
            var mockAsyncUtility = new MockAsyncUtility(this.mockData);

            UtilityFactory utilFactory = new UtilityFactory(context);

            utilFactory.AddOverride <IAsyncUtility>(mockAsyncUtility);

            var managerFactory = new ManagerFactory(context);

            return(managerFactory.CreateManager <T>(null, null, utilFactory));
        }