Ejemplo n.º 1
0
        public void ShouldGetProperArchitecture()
        {
            var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress"));

            Assert.AreEqual(Architecture.ARM, uImage.Architecture);
        }
Ejemplo n.º 2
0
        public void ShouldGetProperOSValue()
        {
            var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress"));

            Assert.AreEqual(OS.Linux, uImage.OperatingSystem);
        }
Ejemplo n.º 3
0
 public void ShouldExtractCorrectImage()
 {
     Assert.AreEqual(File.ReadAllBytes(Utilities.GetBinaryLocation("vexpress-image-extracted")),
                     UImageReader.Load(Utilities.GetBinaryLocation("uImage-vexpress")).GetImageData());
 }
Ejemplo n.º 4
0
        public void ShouldFindCorrectImageType()
        {
            var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-panda"));

            Assert.AreEqual(ImageType.Kernel, uImage.Type);
        }
Ejemplo n.º 5
0
 public void ShouldFailOnImageWithWrongChecksum()
 {
     ELFSharp.UImage.UImage image;
     Assert.AreEqual(UImageResult.BadChecksum, UImageReader.TryLoad(Utilities.GetBinaryLocation("uImage-panda-wrng-cksm"), out image));
 }
Ejemplo n.º 6
0
        public void ShouldProperlyReadTimestamp()
        {
            var uImage = UImageReader.Load(Utilities.GetBinaryLocation("uImage-panda"));

            Assert.AreEqual(new DateTime(2012, 4, 10, 21, 11, 06), uImage.Timestamp);
        }