public void ReregisterWithExistingToken() { var token = new UploadToken(); var file = @"c:\temp\myfile.txt"; var uploads = new WaitingUploads(); uploads.Reregister(token, file); Assert.Throws <UploadNotDeregisteredException>(() => uploads.Reregister(token, @"c:\temp\otherfile.txt")); }
public void ReregisterWithEmptyPath() { var token = new UploadToken(); var uploads = new WaitingUploads(); Assert.Throws <ArgumentException>(() => uploads.Reregister(token, string.Empty)); }
public void Reregister() { var token = new UploadToken(); var file = @"c:\temp\myfile.txt"; var uploads = new WaitingUploads(); uploads.Reregister(token, file); Assert.IsTrue(uploads.HasRegistration(token)); Assert.AreEqual(file, uploads.Deregister(token)); }