public void When_an_error_occurs_while_creating_items_to_collect_the_created_items_must_have_error_status() { var wmi57Prober = new Wmi57Prober(); new ProberBehaviorCreator().CreateBehaviorWithExceptionThrowing(wmi57Prober); var probeResult = wmi57Prober.Execute(base.FakeContext, base.FakeTargetInfo, GetFakeCollectInfo("oval:modulo:obj:4000")); DoAssertForExecutionWithErrors(probeResult, typeof(wmi57_item)); }
public void Should_be_possible_to_collect_a_wmi_object() { // Arrange var wmi57Prober = new Wmi57Prober(); new ProberBehaviorCreator() .CreateBehaviorForNormalFlowExecution( wmi57Prober, new ItemType[] { new wmi57_item() }, new CollectedItem[] { ProbeHelper.CreateFakeCollectedItem(new wmi57_item()) }); // Act var probeResult = wmi57Prober.Execute(base.FakeContext, base.FakeTargetInfo, GetFakeCollectInfo("oval:modulo:obj:4000")); // Assert DoAssertForSingleCollectedObject(probeResult, typeof(wmi57_item)); }