Exemplo n.º 1
0
        /// <summary>
        /// Creates the probe execution with his collect result
        /// </summary>
        /// <param name="probeResult">The probe result.</param>
        /// <param name="probe">The probe.</param>
        /// <param name="session">The session.</param>
        /// <returns></returns>
        private ProbeExecution CreateTheProbeExecution(ProbeResult probeResult, SelectedProbe probe)
        {
            CollectResultFactory collectResultFactory = new CollectResultFactory();

            ProbeExecution executionOfCurrentProbe = collectFactory.CreateAProbeExecution(probeResult, probe.Capability.OvalObject);
            CollectResult  probeExecutionResult    = collectResultFactory.CreateCollectResultForTheProbeExecution(probeResult);

            executionOfCurrentProbe.SystemCharacteristics = probeExecutionResult.SystemCharacteristics;

            return(executionOfCurrentProbe);
        }
Exemplo n.º 2
0
        public void Should_be_possible_to_create_a_collectResult_with_the_error_status_for_the_probeExecution()
        {
            CollectResultFactory factory = new CollectResultFactory();

            ProbeResult probeResult = new ProbeResultFactory().CreateProbeResultForRegostryCollectWithError();

            CollectResult collectResult = factory.CreateCollectResultForTheProbeExecution(probeResult);

            Assert.IsNotNull(collectResult);
            Assert.IsNotNull(collectResult.Date, "the date is null");
            Assert.IsTrue(collectResult.HasErrors(), "the collect result is not complete");
        }