Exemplo n.º 1
0
        public void AllTestZipsFailExceptProper()
        {
            //arrange
            var files = AllPackages();

            foreach (var file in files)
            {
                if (!file.Contains("Proper.zip"))
                {
                    var package = VerificationController.TryParse(file);

                    //assert
                    Assert.IsNotNull(package, "Proper package result is null:" + file);
                    Assert.IsNotNull(package.Messages, "Proper package messages is null:" + file);
                    var hasFail = false;

                    foreach (var m in package.Messages)
                    {
                        if (m.MessageType == MessageTypes.Error)
                        {
                            hasFail = true;
                            break;
                        }
                    }
                    Assert.IsTrue(hasFail, "All non-proper test failed:" + file);
                }
            }
        }
Exemplo n.º 2
0
        public void ProperMinDotNet()
        {
            //arrange
            var path = Package("Proper");
            //act
            var package = VerificationController.TryParse(path);

            //assert
            Assert.AreEqual(package.MinDotNetVersion, "3.5");
        }
Exemplo n.º 3
0
 private void VerifyButton_Click(object sender, EventArgs e)
 {
     BrowseButton.Enabled = false;
     VerifyButton.Enabled = false;
     Application.DoEvents();
     Models.Package package = VerificationController.TryParse(packagePathTextbox.Text);
     propertyGrid1.SelectedObject = package;
     dataGridView1.DataSource     = package.Messages;
     package.CleanUp();
     BrowseButton.Enabled = true;
     VerifyButton.Enabled = true;
     Application.DoEvents();
 }
Exemplo n.º 4
0
        public void ProperTest()
        {
            //arrange
            var path = Package("Proper");

            Console.WriteLine(path);

            //act
            var package = VerificationController.TryParse(path);

            //assert
            Assert.IsNotNull(package, "Proper package result is null:" + path);
        }
Exemplo n.º 5
0
        public void ProperNoErrorsTest()
        {
            //arrang
            var path = Package("Proper");

            Console.WriteLine(path);

            //act
            var package = VerificationController.TryParse(path);

            //assert
            Assert.IsNotNull(package, "Proper package result is null:" + path);
            Assert.IsNotNull(package.Messages, "Proper package messages is null:" + path);
            foreach (var m in package.Messages)
            {
                Assert.AreEqual(m.MessageType, MessageTypes.Error, "Proper package message has an error:" + m.Message + " " + m.Rule + " " + path);
            }
        }