diff --git a/test/Microsoft.ComponentDetection.Detectors.Tests/PythonVersionTests.cs b/test/Microsoft.ComponentDetection.Detectors.Tests/PythonVersionTests.cs index 89f399baa..b407eb240 100644 --- a/test/Microsoft.ComponentDetection.Detectors.Tests/PythonVersionTests.cs +++ b/test/Microsoft.ComponentDetection.Detectors.Tests/PythonVersionTests.cs @@ -15,15 +15,28 @@ public class PythonVersionTests [TestMethod] public void TestBasicVersionConstruction() { - PythonVersion pythonVersion = new PythonVersion("4!3.2.1.1rc2.post99.dev2"); + var pythonVersion = new PythonVersion("4!3.2.1.1rc2.post99.dev2"); - Assert.AreEqual(pythonVersion.Epoch, 4); - Assert.AreEqual(pythonVersion.Release, "3.2.1.1"); - Assert.AreEqual(pythonVersion.PreReleaseLabel, "rc"); - Assert.AreEqual(pythonVersion.PostNumber, 99); - Assert.AreEqual(pythonVersion.DevNumber, 2); + Assert.AreEqual(4, pythonVersion.Epoch); + Assert.AreEqual("3.2.1.1", pythonVersion.Release); + Assert.AreEqual("rc", pythonVersion.PreReleaseLabel); + Assert.AreEqual(99, pythonVersion.PostNumber); + Assert.AreEqual("dev", pythonVersion.DevLabel); + Assert.AreEqual(2, pythonVersion.DevNumber); + } + + [TestMethod] + public void TestDefaultDevVersionConstruction() + { + var pythonVersion = new PythonVersion("4!3.2.1.1rc2.post90.dev"); - var newPythonVersion = new PythonVersion("0.3m1"); + Assert.AreEqual(4, pythonVersion.Epoch); + Assert.AreEqual("3.2.1.1", pythonVersion.Release); + Assert.AreEqual("rc", pythonVersion.PreReleaseLabel); + Assert.AreEqual(2, pythonVersion.PreReleaseNumber); + Assert.AreEqual(90, pythonVersion.PostNumber); + Assert.AreEqual("dev", pythonVersion.DevLabel); + Assert.AreEqual(0, pythonVersion.DevNumber); } [TestMethod]