public void TestReadFail() { using (var s = new DiskServiceImpl(GetPersistenceWithData())) { s.ReadBlock(new UserDto { Login = "******", HashedPassword = "******" }, _disk.Id, 33); } }
public void TestWriteRead() { using (var s = new DiskServiceImpl(GetPersistenceWithData())) { var expected = new byte[100]; new Random(1).NextBytes(expected); s.WriteBlock(_userDto, _disk.Id, 33, expected); var actual = s.ReadBlock(_userDto, _disk.Id, 33); for (var i = 0; i < expected.Length; i++) Assert.AreEqual(expected[i], actual[i]); } }