public void Should_load_the_messages_from_the_endpoint()
        {
            var endpoint = new Endpoint { Host = "localhost", Name = "Service" };
            serviceControl.GetAuditMessages(Arg.Is(endpoint), Arg.Any<string>(), Arg.Any<int>(), Arg.Any<string>(), Arg.Any<bool>())
                .Returns(x => new PagedResult<StoredMessage>
                {
                    CurrentPage = 1,
                    TotalCount = 100,
                    Result = new List<StoredMessage>
                    {
                        new StoredMessage(),
                        new StoredMessage()
                    }
                });

            var messageList = messageListFunc();

            messageList.Handle(new SelectedExplorerItemChanged(new AuditEndpointExplorerItem(endpoint)));

            messageList.Rows.Count.ShouldBe(2);
            searchBar.IsVisible.ShouldBe(true);
        }
Esempio n. 2
0
 protected bool Equals(Endpoint other) => other != null && string.Equals(Address, other.Address);
 public RequestSelectingEndpoint(Endpoint endpoint)
 {
     Endpoint = endpoint;
 }
 public AuditEndpointExplorerItem(Endpoint endpoint, string hostNames = "")
     : base(endpoint)
 {
     HostNames = hostNames;
 }