Пример #1
0
        public void MapBlock()
        {
            Errno error = _fs.MapBlock("49470015", 0, out long block);

            Assert.AreEqual(Errno.IsDirectory, error);

            error = _fs.MapBlock("49470015/TitleImage", 0, out block);
            Assert.AreEqual(Errno.NoSuchFile, error);

            error = _fs.MapBlock("49470015/TitleImage.xbx", 0, out block);
            Assert.AreEqual(Errno.NoError, error);
            Assert.AreEqual(80, block);

            error = _fs.MapBlock("49470015/7AC2FE88C908/savedata.dat", 2, out block);
            Assert.AreEqual(Errno.NoError, error);
            Assert.AreEqual(272, block);

            error = _fs.MapBlock("49470015/7AC2FE88C908/savedata.dat", 200, out block);
            Assert.AreEqual(Errno.InvalidArgument, error);
        }
Пример #2
0
        public void MapBlock()
        {
            Errno error = _fs.MapBlock("Content/0000000000000000/FFFE07DF/00040000", 0, out long block);

            Assert.AreEqual(Errno.IsDirectory, error);

            error = _fs.MapBlock("Content/0000000000000000/FFFE07DF/00040000/ContentCache", 0, out block);
            Assert.AreEqual(Errno.NoSuchFile, error);

            error = _fs.MapBlock("Content/0000000000000000/FFFE07DF/00040000/ContentCache.pkg", 0, out block);
            Assert.AreEqual(Errno.NoError, error);
            Assert.AreEqual(16992, block);

            error = _fs.MapBlock("Content/0000000000000000/FFFE07DF/00040000/ContentCache.pkg", 2, out block);
            Assert.AreEqual(Errno.NoError, error);
            Assert.AreEqual(17056, block);

            error = _fs.MapBlock("Content/0000000000000000/FFFE07DF/00040000/ContentCache.pkg", 2000000, out block);
            Assert.AreEqual(Errno.InvalidArgument, error);
        }