VS2019 error on MacBook

tancat
tancat used Ask the Experts™
on
My background is Oracle development but I'm learning C#/.NET - very brand new.  I'm going through a tutorial and am getting an error message.  I'm using a MacBookPro (to which I am also new), VS2019 Free/Community(?) version, and trying to run some tests using "MSTest Project".  I got the same error using "xUnit Test Project".  Please forgive if I'm using the wrong terminology.  

My tiny little project builds with no errors.  I'm using 'Run All' under Unit Tests to run the tests.  When testing a static method, the test runs fine.  However, when testing a property, I get a pop-up box that starts with "dotnet quit unexpectedly" and includes a whole bunch (like pages and pages) of information about the error that might make sense to someone.  I have not found any answers on google that involve intermittent causes (usually it's on building or running after an upgrade or something like that).  

Here are my two tests:
     [TestMethod]
        public void FullNameTestValid()
        {
            //--Arrange
            Customer customer = new Customer
            {
                FirstName = "Bilbo",
                LastName = "Baggins"
            };
            string expected = "Baggins, Bilbo";

            //--Act
            string actual = customer.FullName;

            //--Assert
            Assert.AreEqual(expected, actual);
        }
        [TestMethod]
        public void StaticTest()
        {
            //--Arrange
            var c1 = new Customer();
            c1.FirstName = "Bilbo";
            Customer.InstanceCount += 1;

            var c2 = new Customer();
            c2.FirstName = "Frodo";
            Customer.InstanceCount += 1;

            var c3 = new Customer();
            c3.FirstName = "Rosie";
            Customer.InstanceCount += 1;

            //--Act

            //--Assert
            Assert.AreEqual(3, Customer.InstanceCount);

        }

Open in new window

 

As soon as I figure out how to create a text document on a Mac, I will attach the contents of the error message.  Besides the error message, please let me know what additional information is needed to investigate this problem.  

Thank you!
VS2019_MacBook_error_msg.rtf
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Oracle Developer
Commented:
The problem was that I was using [TestMethod] instead of [TestProperty], which I probably should have figured out when I was typing my question but lacking experience, it didn't dawn on me until this morning.  

It seems like overkill and a huge waste to log and report all of this information just for something that, to me seems like it should have been caught during the build.  Maybe this is one of those subtle things I'll understand after I've been doing this for a couple of years.  

Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial