예제 #1
0
 internal static void AssertSnapshot(INodesInPath inodesInPath, bool isSnapshot, Org.Apache.Hadoop.Hdfs.Server.Namenode.Snapshot.Snapshot
                                     snapshot, int index)
 {
     NUnit.Framework.Assert.AreEqual(isSnapshot, inodesInPath.IsSnapshot());
     NUnit.Framework.Assert.AreEqual(Org.Apache.Hadoop.Hdfs.Server.Namenode.Snapshot.Snapshot
                                     .GetSnapshotId(isSnapshot ? snapshot : null), inodesInPath.GetPathSnapshotId());
     if (!isSnapshot)
     {
         NUnit.Framework.Assert.AreEqual(Org.Apache.Hadoop.Hdfs.Server.Namenode.Snapshot.Snapshot
                                         .GetSnapshotId(snapshot), inodesInPath.GetLatestSnapshotId());
     }
     if (isSnapshot && index >= 0)
     {
         NUnit.Framework.Assert.AreEqual(typeof(Snapshot.Root), inodesInPath.GetINode(index
                                                                                      ).GetType());
     }
 }