public void HashExists_HashNotExists_False() { FilesHashesHandler filesHashesHandler = new FilesHashesHandler( A.Dummy <IDuplicateChecker>(), A.Dummy <IObjectSerializer>(), new UnregisteredHashesAdder(mConfiguration), mConfiguration); filesHashesHandler.AddFileHash("ABC123", "fileName"); Assert.False(filesHashesHandler.HashExists("ABC1235")); }
public void HashExists_HashAlreadyExists_True() { FilesHashesHandler filesHashesHandler = new FilesHashesHandler( A.Dummy <IDuplicateChecker>(), A.Dummy <IObjectSerializer>(), new UnregisteredHashesAdder(mConfiguration), mConfiguration); const string hash = "ABC123"; filesHashesHandler.AddFileHash(hash, "fileName"); Assert.True(filesHashesHandler.HashExists(hash)); }