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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user