コード例 #1
0
        public void VulnerableGraphTest()
        {
            // Perform the full process for scanning
            PSVForm testForm = new PSVForm();

            testForm.remoteRadio.Checked     = true;
            testForm.projectURLTextBox.Text  = "https://github.com/Bonfire/Legionary.git";
            testForm.pathToCloneTextBox.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            testForm.cloneProject();
            testForm.loadProject();
            testForm.beginScan();

            // Assert that there were 4 files scanned and populated
            Assert.IsTrue(testForm.faultChart.Series[0].Values.Count == 4);
        }
コード例 #2
0
        public void VulnerableTableTest()
        {
            // Perform the full process for scanning
            PSVForm testForm = new PSVForm();

            testForm.remoteRadio.Checked     = true;
            testForm.projectURLTextBox.Text  = "https://github.com/Bonfire/Legionary.git";
            testForm.pathToCloneTextBox.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            testForm.cloneProject();
            testForm.loadProject();
            testForm.beginScan();

            // Arbitrary file and prediction
            Assert.IsTrue(testForm.faultListView.Items[2].Text == "Pipfile");
            Assert.IsTrue(Convert.ToDouble(testForm.faultListView.Items[2].SubItems[1].Text) == 0.24834655);
        }