Ejemplo n.º 1
0
        public async Task GetLabelsAsync_Given_Labels_In_DB_Exist_Should_Return_Collection_Of_Labels()
        {
            IEnumerable <Label> labels = new List <Label>()
            {
                new Label(),
                new Label(),
                new Label(),
                new Label()
            };

            labelManager
            .Setup(s => s.GetAllLabelsAsync())
            .Returns(Task.FromResult(labels));

            var retval = await _labelController.GetLabelsAsync() as OkObjectResult;

            Assert.IsNotNull(retval.Value);
        }