/// <summary> /// Initializes a new instance. /// </summary> /// /// <exception cref="ArgumentNullException"> /// A null reference was passed to a method that did not accept it as a valid argument.</exception> public FeigSoftwareInfo(FeigSoftwareInfo info) { Verify.NotNull(info, nameof(info)); FirmwareVersion = info.FirmwareVersion; HardwareType = info.HardwareType; ReaderType = info.ReaderType; SupportedTransponders = info.SupportedTransponders; }
public void Construction_Defaults() { // act var info = new FeigSoftwareInfo(); // assert Check.That(info.FirmwareVersion).IsEqualTo(new Version(0, 0, 0)); Check.That(info.HardwareType).IsEqualTo(0x00); Check.That(info.ReaderType).IsEqualTo(FeigReaderType.Unknown); Check.That(info.SupportedTransponders).IsEqualTo(0x0000); Check.That(info.ToString()) .IsEqualTo( "FirmwareVersion: 0.0.0, HardwareType: 0x00, ReaderType: Unknown, SupportedTransponders: 0x0000" ); }
public void Construction_Copy() { // act var copy = new FeigSoftwareInfo { FirmwareVersion = new Version(3, 4, 0), HardwareType = 0x34, ReaderType = FeigReaderType.CPR40, SupportedTransponders = 0x1234, }; var info = new FeigSoftwareInfo(copy); // assert Check.That(info.FirmwareVersion).IsEqualTo(new Version(3, 4, 0)); Check.That(info.HardwareType).IsEqualTo(0x34); Check.That(info.ReaderType).IsEqualTo(FeigReaderType.CPR40); Check.That(info.SupportedTransponders).IsEqualTo(0x1234); Check.That(info.ToString()) .IsEqualTo( "FirmwareVersion: 3.4.0, HardwareType: 0x34, ReaderType: CPR40, SupportedTransponders: 0x1234" ); }