public void TC01_LateLoading()
        {
            if (HaveAssembly("LameDLLWrap"))
            {
                Assert.Inconclusive("The LameDLLWrap assembly was loaded before the Loader test was run.");
            }
            else
            {
                // Provoke loader to extract resource DLL and load assembly
                Assert.IsNotNull(LameDLL.GetLameVersion());

                // Confirm loading successful
                Assert.IsTrue(HaveAssembly("LameDLLWrap"));
            }
        }
Exemple #2
0
        public void TC02_DLLVersion()
        {
            // GetLameVersion does not return the build number.
            var strVer = LameDLL.LameVersion;
            var ver    = LameDLL.GetLameVersion();

            // If build number is 0 then it is omitted.  Add a dummy ".0" at the end
            var verParts = (strVer + ".0").Split('.');

            Assert.IsTrue(verParts.Length >= 3, $"Invalid version string \"{strVer}\"");
            Assert.IsTrue(int.TryParse(verParts[2], out int verBuild), $"Failed to parse build number from \"{strVer}\"");

            // check version is 3.99.5 or higher
            bool versionCheck = ver.Major == 3 && (ver.Minor > 99 || (ver.Minor == 99 && verBuild >= 5));

            Assert.IsTrue(versionCheck, $"Expected LAME dll version >= 3.99.5, found {strVer}");
        }