AsyncMediator.Test.MediatorTests.LookupQuery_CanLookupData C# (CSharp) Method

LookupQuery_CanLookupData() private method

private LookupQuery_CanLookupData ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task LookupQuery_CanLookupData()
        {
            // Arrange
            var handlerFactory = new MessageHandlerRegistry();
            var mediator = new Mediator(handlerFactory.MultiInstanceFactory, handlerFactory.SingleInstanceFactory);
            handlerFactory.AddHandlersForCommandOrQuery<ILookupQuery<List<FakeResult>>>(new FindResultForLookup());

            // Act
            var result = await mediator.LoadList<List<FakeResult>>();

            // Assert
            Assert.IsTrue(result.Count == FakeDataStore.Results.Count);
        }
    }