Ejemplo n.º 1
0
        public void ProgramDescription_IsMatchingProgramDescriptionWithMatchingProgramIdentifierMatchingRomFormatCfgCrcMustMatchWithCodeInfoHasInfoButDoesNotSupportCode_ReturnsFalse()
        {
            var romPaths    = ProgramDescriptionHelpersTestStorage.Initialize(TestRomResources.TestBinPath, TestRomResources.TestCfgPath);
            var rom         = Rom.Create(romPaths[0], romPaths[1]);
            var code        = "tag";
            var information = new IntvFunhouseXmlProgramInformation()
            {
                ProgramTitle               = "Tagalong Tod",
                YearString                 = "2000",
                CrcString                  = "0x" + rom.Crc.ToString("x8", CultureInfo.InvariantCulture),
                CrcNotesString             = string.Empty,
                CrcIncompatibilitiesString = string.Empty,
                CfgFiles = "0",
                Code     = code
            };
            var description = new ProgramDescription(rom.Crc, rom, information);

            Assert.False(description.IsMatchingProgramDescription(new ProgramIdentifier(rom.Crc, rom.CfgCrc), RomFormat.Bin, cfgCrcMustMatch: true, code: code));
        }
Ejemplo n.º 2
0
        public void ProgramDescription_IsMatchingProgramDescriptionWithNullDescriptionInvalidProgramIdentifierAndValidRomFormatCfgCrcMustNotMatch_ThrowsArgumentNullException()
        {
            ProgramDescription description = null;

            Assert.Throws <ArgumentNullException>(() => description.IsMatchingProgramDescription(ProgramIdentifier.Invalid, RomFormat.CuttleCart3, cfgCrcMustMatch: false));
        }
Ejemplo n.º 3
0
        public void ProgramDescription_IsMatchingProgramDescriptionWithNullDescriptionAndInvalidProgramIdentifier_ThrowsArgumentNullException()
        {
            ProgramDescription description = null;

            Assert.Throws <ArgumentNullException>(() => description.IsMatchingProgramDescription(ProgramIdentifier.Invalid));
        }