コード例 #1
0
ファイル: UnameProberTests.cs プロジェクト: ywcsz/modSIC
        public void Should_be_possible_handle_exception_during_collecting()
        {
            var prober = new UnameProber();
            var fakeCollectInfo = base.GetFakeCollectInfo("9", "definitions_all_unix");
            new ProberBehaviorCreator().CreateBehaviorWithExceptionThrowing(prober);

            var probeResult = prober.Execute(base.FakeContext, base.FakeTargetInfo, fakeCollectInfo);

            DoAssertForExecutionWithErrors(probeResult, typeof(uname_item));
        }
コード例 #2
0
ファイル: UnameProberTests.cs プロジェクト: ywcsz/modSIC
        public void Should_be_possible_to_collect_uname_object()
        {
            // Arrange
            var prober = new UnameProber();
            var probeBehaviorCreator = new ProberBehaviorCreator();
            var fakeCollectInfo = base.GetFakeCollectInfo("9", "definitions_all_unix");
            probeBehaviorCreator.CreateBehaviorForNormalFlowExecution(
                prober,
                new ItemType[] { new uname_item() },
                new CollectedItem[] { ProbeHelper.CreateFakeCollectedItem(new uname_item()) });

            // Act
            var probeResult = prober.Execute(base.FakeContext, base.FakeTargetInfo, fakeCollectInfo);

            // Assert
            DoAssertForSingleCollectedObject(probeResult, typeof(uname_item));
        }