Beispiel #1
0
 /// <exception cref="System.IO.IOException"/>
 public BlockStorageLocation(BlockLocation loc, VolumeId[] volumeIds)
     : base(loc.GetNames(), loc.GetHosts(), loc.GetTopologyPaths(), loc.GetOffset(), loc
            .GetLength(), loc.IsCorrupt())
 {
     // Initialize with data from passed in BlockLocation
     this.volumeIds = volumeIds;
 }
 /// <exception cref="System.Exception"/>
 private static void CheckBlockLocation(BlockLocation loc, string[] names, string[]
                                        hosts, string[] cachedHosts, string[] topologyPaths, long offset, long length,
                                        bool corrupt)
 {
     NUnit.Framework.Assert.IsNotNull(loc.GetHosts());
     NUnit.Framework.Assert.IsNotNull(loc.GetCachedHosts());
     NUnit.Framework.Assert.IsNotNull(loc.GetNames());
     NUnit.Framework.Assert.IsNotNull(loc.GetTopologyPaths());
     Assert.AssertArrayEquals(hosts, loc.GetHosts());
     Assert.AssertArrayEquals(cachedHosts, loc.GetCachedHosts());
     Assert.AssertArrayEquals(names, loc.GetNames());
     Assert.AssertArrayEquals(topologyPaths, loc.GetTopologyPaths());
     Assert.Equal(offset, loc.GetOffset());
     Assert.Equal(length, loc.GetLength());
     Assert.Equal(corrupt, loc.IsCorrupt());
 }