public void Test9() { ArrayList events = new ArrayList(); DummyConnection connection = new DummyConnection(events); DummyChoker choker = new DummyChoker(events); DummyStorageWrapper storageWrapper = new DummyStorageWrapper(events); new Upload(connection, choker, storageWrapper, 100, 20, 5); }
public void Test7() { ArrayList events = new ArrayList(); DummyConnection connection = new DummyConnection(events); DummyChoker choker = new DummyChoker(events); DummyStorageWrapper storageWrapper = new DummyStorageWrapper(events); Upload upload = new Upload(connection, choker, storageWrapper, 100, 20, 5); upload.GetRequest(0, 1, 3); }
public void Test4() { ArrayList events = new ArrayList(); DummyConnection connection = new DummyConnection(events); DummyChoker choker = new DummyChoker(events); DummyStorageWrapper storageWrapper = new DummyStorageWrapper(events); Upload upload = new Upload(connection, choker, storageWrapper, 100, 20, 5); upload.Unchoke(); upload.GetInterested(); connection.Flushed = true; upload.GetRequest(0, 1, 3); }
public void Test1() { ArrayList events = new ArrayList(); DummyConnection connection = new DummyConnection(events); DummyChoker choker = new DummyChoker(events); DummyStorageWrapper storageWrapper = new DummyStorageWrapper(events); Upload upload = new Upload(connection, choker, storageWrapper, 100, 20, 5); Assert.AreEqual(true, upload.Choked); Assert.AreEqual(false, upload.Interested); upload.GetInterested(); Assert.AreEqual(true, upload.Interested); upload.GetRequest(0, 0, 3); connection.Flushed = true; upload.Flush(); }