예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void fullPathFileNamesUsedForMonitoringBackup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void FullPathFileNamesUsedForMonitoringBackup()
        {
            // given
            AtomicBoolean          wasActivated = new AtomicBoolean(false);
            StoreCopyClientMonitor monitor      = new StoreCopyClientMonitor_AdapterAnonymousInnerClass(this, wasActivated);

            // and
            ToFileStoreWriter writer     = new ToFileStoreWriter(_directory.absolutePath(), _fs, monitor);
            ByteBuffer        tempBuffer = ByteBuffer.allocate(128);

            // when
            writer.Write("expectedFileName", new DataProducer(16), tempBuffer, true, 16);

            // then
            assertTrue(wasActivated.get());
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void writeAndVerify(ToFileStoreWriter writer, ByteBuffer tempBuffer, java.io.File file) throws java.io.IOException
        private void WriteAndVerify(ToFileStoreWriter writer, ByteBuffer tempBuffer, File file)
        {
            writer.Write(file.Name, new DataProducer(16), tempBuffer, true, 16);
            assertTrue("File created by writer should exist.", _fs.fileExists(file));
            assertEquals(16, _fs.getFileSize(file));
        }