This commit is contained in:
2021-06-13 10:28:03 +02:00
parent eb70603c85
commit df2d24cbd3
7487 changed files with 943244 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
using System.Collections.Generic;
using JetBrains.Annotations;
using Unity.Cloud.Collaborate.Models.Structures;
using Unity.Cloud.Collaborate.Presenters;
using Unity.Cloud.Collaborate.Views;
namespace Unity.Cloud.Collaborate.Tests.Presenters
{
internal class TestHistoryView : IHistoryView
{
public IHistoryPresenter Presenter { get; set; }
public bool DialogueReturnValue = true;
public bool? BusyStatus;
public int? Page;
public int? MaxPage;
[CanBeNull]
public IHistoryEntry ReceivedEntry;
[CanBeNull]
public string DialogueTitle;
[CanBeNull]
public string DialogueMessage;
[CanBeNull]
public string DialogueAffirmative;
[CanBeNull]
public string DialogueNegative;
[CanBeNull]
public IReadOnlyList<IHistoryEntry> ReceivedList;
public void SetBusyStatus(bool busy)
{
BusyStatus = busy;
}
public void SetHistoryList(IReadOnlyList<IHistoryEntry> list)
{
ReceivedList = list;
ReceivedEntry = null;
}
public void SetPage(int page, int max)
{
Page = page;
MaxPage = max;
}
public void SetSelection(IHistoryEntry entry)
{
ReceivedEntry = entry;
ReceivedList = null;
}
public bool DisplayDialogue(string title, string message, string affirmative)
{
DialogueTitle = title;
DialogueMessage = message;
DialogueAffirmative = affirmative;
DialogueNegative = null;
return DialogueReturnValue;
}
public bool DisplayDialogue(string title, string message, string affirmative, string negative)
{
DialogueTitle = title;
DialogueMessage = message;
DialogueAffirmative = affirmative;
DialogueNegative = negative;
return DialogueReturnValue;
}
}
}