Esempio n. 1
0
 public void Test()
 {
     for (int i = 0; i < testfiles.Length; i++)
     {
         string  location = Path.Combine(Consts.TestFilesRoot, "partitions", "pc98", testfiles[i]);
         IFilter filter   = new LZip();
         filter.Open(location);
         IMediaImage image = new T98();
         Assert.AreEqual(true, image.Open(filter), testfiles[i]);
         List <Partition> partitions = Core.Partitions.GetAll(image);
         Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
         for (int j = 0; j < partitions.Count; j++)
         {
             // Too chatty
             //Assert.AreEqual(wanted[i][j].PartitionDescription, partitions[j].PartitionDescription, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Length, partitions[j].Length, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Name, partitions[j].Name, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Type, partitions[j].Type, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Sequence, partitions[j].Sequence, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Start, partitions[j].Start, testfiles[i]);
         }
     }
 }
Esempio n. 2
0
 static bool Do98(T98 t) {
   Nullable<T98> n = new Nullable<T98>(t);
   return Ensure(n.HasValue && n.Value == t);
 }