public void ProgramDescription_EqualsNull_ReturnsFalse() { var information = new TestProgramInformation(); var crc = 1u; var name = "AgletMaster 5800a"; information.AddCrc(crc, name); var description = new ProgramDescription(crc, null, information); Assert.False(description.Equals(null)); }
public void ProgramDescription_NullEquals_ThrowsNullReferenceException() { var information = new TestProgramInformation(); var crc = 1u; var name = "AgletMaster 5900a"; information.AddCrc(crc, name); var description = new ProgramDescription(crc, null, information); ProgramDescription nullProgramDescription = null; Assert.Throws <NullReferenceException>(() => nullProgramDescription.Equals(description)); }
public void ProgramDescription_EqualsSelf_ReturnsTrue() { var information = new TestProgramInformation(); var crc = 1u; var name = "AgletMaster 5700a"; information.AddCrc(crc, name); var description = new ProgramDescription(crc, null, information); var self = description; Assert.True(description.Equals(self)); }
public void ProgramDescription_EqualsForTwoInstancesOfEqualDescriptionsWithNullRom_ReturnsTrue() { var information0 = new TestProgramInformation(); var crc0 = 3u; var name0 = "AgletMaster 5903a"; information0.AddCrc(crc0, name0); var information1 = new TestProgramInformation(); var crc1 = 3u; var name1 = "AgletMaster 5903"; information1.AddCrc(crc1, name1); var description0 = new ProgramDescription(crc0, null, information0); var description1 = new ProgramDescription(crc1, null, information1); Assert.True(description0.Equals(description1)); }
public void ProgramDescription_EqualsForTwoDifferentDescriptionsWithNullRom_ReturnsFalse() { var information0 = new TestProgramInformation(); var crc0 = 1u; var name0 = "AgletMaster 5901a"; information0.AddCrc(crc0, name0); var information1 = new TestProgramInformation(); var crc1 = 2u; var name1 = "AgletMaster 5902a"; information1.AddCrc(crc1, name1); var description0 = new ProgramDescription(crc0, null, information0); var description1 = new ProgramDescription(crc1, null, information1); Assert.False(description0.Equals(description1)); }