public void ShouldGetProperArchitecture() { var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress")); Assert.AreEqual(Architecture.ARM, uImage.Architecture); }
public void ShouldGetProperOSValue() { var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress")); Assert.AreEqual(OS.Linux, uImage.OperatingSystem); }
public void ShouldExtractCorrectImage() { Assert.AreEqual(File.ReadAllBytes(Utilities.GetBinaryLocation("vexpress-image-extracted")), UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress")).GetImageData()); }
public void ShouldFindCorrectImageType() { var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-panda")); Assert.AreEqual(ImageType.Kernel, uImage.Type); }
public void ShouldFailOnImageWithWrongChecksum() { ELFSharp.UImage.UImage image; Assert.AreEqual(UImageResult.BadChecksum, UImageReader.TryLoad(Utilities.GetBinaryLocation("uImage-panda-wrng-cksm"), out image)); }
public void ShouldProperlyReadTimestamp() { var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-panda")); Assert.AreEqual(new DateTime(2012, 4, 10, 21, 11, 06), uImage.Timestamp); }