1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-20 02:03:49 +00:00

Send file model changes (#1293)

* Remove Url from SendFile.
Add file length hit to SendRequest

* Populate SendRequest file length
This commit is contained in:
Matt Gibson
2021-03-02 10:09:26 -06:00
committed by GitHub
parent 1098686d51
commit 2c13cef17c
8 changed files with 14 additions and 17 deletions

View File

@@ -13,15 +13,16 @@ namespace Bit.Core.Test.Models.Request
public class SendRequestTests
{
[Theory]
[InlineCustomAutoData(new[] { typeof(TextSendCustomization) })]
[InlineCustomAutoData(new[] { typeof(FileSendCustomization) })]
public void SendRequest_FromSend_Success(Send send)
[InlineCustomAutoData(new[] { typeof(TextSendCustomization) }, null)]
[InlineCustomAutoData(new[] { typeof(FileSendCustomization) }, 100)]
public void SendRequest_FromSend_Success(long? fileLength, Send send)
{
var request = new SendRequest(send);
var request = new SendRequest(send, fileLength);
TestHelper.AssertPropertyEqual(send, request, "Id", "AccessId", "UserId", "Name", "Notes", "File", "Text", "Key", "AccessCount", "RevisionDate");
Assert.Equal(send.Name?.EncryptedString, request.Name);
Assert.Equal(send.Notes?.EncryptedString, request.Notes);
Assert.Equal(fileLength, request.FileLength);
switch (send.Type)
{