コード例 #1
0
ファイル: OvalTests.cs プロジェクト: yonglehou/modSIC
        public void Should_be_possible_to_read_sapcode_objects()
        {
            PluginContainer.RegisterOvalAssembly(typeof(sapcode_object).Assembly);
            var def = GetFakeOvalDefinitions("definitions_all_sapcode.xml");

            Assert.AreEqual(26, def.objects.OfType <sapcode_object>().Count());
        }
コード例 #2
0
        public void Should_be_possible_to_collect_sapcode_objects()
        {
            PluginContainer.RegisterOvalAssembly(typeof(sapcode_object).Assembly);
            var def = GetFakeOvalDefinitions("definitions_all_sapcode.xml");
            // Arrange

            var sapProber = new SapCodeProberWindows();

            FakeTargetInfo["HostName"] = " http://patton.mte.modulo.com:8080/CodeControlWeb/services/ScanWS";
            FakeTargetInfo.credentials = new Credentials("", "admin", "xtet01", null);
            // Act
            var result = sapProber.Execute(FakeContext, FakeTargetInfo, ProbeHelper.CreateFakeCollectInfo(def.objects, null, null));

            // Assert
            // DoAssertForSingleCollectedObject(result, typeof(sapcode_item));
            Assert.IsTrue(Convert.ToInt32(((sapcode_item)result.CollectedObjects.First().SystemData[0]).total_issues_found.Value) > 0);
            Assert.AreEqual("0", ((sapcode_item)result.CollectedObjects.Last().SystemData[0]).total_issues_found.Value);
        }