public void RomComparerStrictCrcOnlyTests_CompareRomToNull_ReturnsOne()
        {
            var romPath = RomComparerStrictCrcOnlyTestStorageAccess.Initialize(TestRomResources.TestLuigiFromBinPath).First();
            var rom     = Rom.Create(romPath, null);

            Assert.NotNull(rom);

            var compareResult = RomComparerStrictCrcOnly.Default.Compare(rom, null);

            Assert.Equal(1, compareResult);
        }
        public void RomComparerStrictCrcOnlyTests_CompareNullToRom_ReturnsNegativeOne()
        {
            var paths = RomComparerStrictCrcOnlyTestStorageAccess.Initialize(TestRomResources.TestBinPath, TestRomResources.TestCfgPath);
            var rom   = Rom.Create(paths[0], paths[1]);

            Assert.NotNull(rom);

            var compareResult = RomComparerStrictCrcOnly.Default.Compare(null, rom);

            Assert.Equal(-1, compareResult);
        }
        public void RomComparerStrictCrcOnlyTests_CompareCorruptAndMissingRoms_ReturnPathCompareResult()
        {
            RomComparerStrictCrcOnlyTestStorageAccess.Initialize();
            var rom0 = new CorruptedTestRom("whos/on/first.rom");
            var rom1 = new XmlRom();

            rom1.UpdateRomPath("/what/is/on/second.bin");

            var compareResult = RomComparerStrictCrcOnly.Default.Compare(rom0, rom1);

            Assert.Equal(string.Compare(rom0.RomPath, rom1.RomPath), compareResult);
        }
        public void RomComparerStrictCrcOnlyTests_CompareMissingRoms_ReturnPathCompareResult()
        {
            RomComparerStrictCrcOnlyTestStorageAccess.Initialize();
            var rom0 = new XmlRom();

            rom0.UpdateRomPath("/where/is/waldo.bin");
            var rom1 = new XmlRom();

            rom1.UpdateRomPath("where/in/the/world/is/carmen/sandiego.rom");

            var compareResult = RomComparerStrictCrcOnly.Default.Compare(rom0, rom1);

            Assert.Equal(string.Compare(rom0.RomPath, rom1.RomPath), compareResult);
        }
        public void RomComparerStrictCrcOnlyTests_CompareRoms_CompareCorrectly(string firstRomPath, string secondRomPath, int expectedCompareResult)
        {
            var paths = RomComparerStrictCrcOnlyTestStorageAccess.Initialize(firstRomPath, secondRomPath);
            var rom0  = Rom.Create(paths[0], null);

            Assert.NotNull(rom0);
            var rom1 = Rom.Create(paths[1], null);

            Assert.NotNull(rom1);

            var compareResult = RomComparerStrictCrcOnly.Default.Compare(rom0, rom1);

            Assert.Equal(expectedCompareResult, compareResult);
        }