Beispiel #1
0
        protected override void ConfigureObjectCollector()
        {
            if (ObjectCollector == null)
                ObjectCollector = new FamilyObjectCollector() { FamilyCollector = CreateFamilyCollectorForWindows()};

            if (ItemTypeGenerator == null)
                ItemTypeGenerator = new FamilyItemTypeGenerator();
        }
Beispiel #2
0
        private FamilyProberUnix GetMockedFamilyProberForUnix(Exception exceptionToThrow)
        {
            MockRepository mocks = new MockRepository();
            var fakeConnMng = mocks.DynamicMock<IConnectionManager>();
            var fakeFamilyCollectorUnix = mocks.DynamicMock<FamilyCollectorUnix>();
            
            if (exceptionToThrow == null)
                Expect.Call(fakeFamilyCollectorUnix.GetOperatingSystemFamily()).Return(FAKE_FAMILY);
            else
                Expect.Call(fakeFamilyCollectorUnix.GetOperatingSystemFamily()).Throw(exceptionToThrow);
            
            mocks.ReplayAll();

            var FakeFamilyObjectCollector = new FamilyObjectCollector() { FamilyCollector = fakeFamilyCollectorUnix };
            return new FamilyProberUnix() { ConnectionManager = fakeConnMng, ObjectCollector = FakeFamilyObjectCollector };
        }