public void ThenShouldReturnReversedBytesBeginningWithNullGivenComputerArchitectureIsBigEndianAndAddNullTrue() { // Arrange var converter = new ExifBitConverter(new BigEndianComputerArchitectureInfoFake()); // Act var bytes = converter.GetBytes("Hello", true); // Assert Assert.That(bytes, Is.EqualTo(new[] { 0x0, 0x6f, 0x6c, 0x6c, 0x65, 0x48 })); }
public void ThenShouldReverseByteArrayGivenComputerArchitectureIsBigEndian() { // Arrange var converter = new ExifBitConverter(new BigEndianComputerArchitectureInfoFake()); // Act var bytes = converter.GetBytes("Hello", false); // Assert Assert.That(bytes, Is.EqualTo(new[] { 0x6f, 0x6c, 0x6c, 0x65, 0x48 })); }
public void ThenShouldReturnBytesPlusNullGivenComputerArchitectureIsLittleEndianAndAddNullTrue() { // Arrange var converter = new ExifBitConverter(new LittleEndianComputerArchitectureInfoFake()); // Act var bytes = converter.GetBytes("Hello", true); // Assert Assert.That(bytes, Is.EqualTo(new[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x0 })); }