Пример #1
0
        public async void TestGet()
        {
            //Arrange
            var id = _context.Entries
                     .Select(c => c.Id)
                     .FirstOrDefault();

            //Act
            var result = await _controller.GetEntry(id);

            var dto = result.GetValue <OkObjectResult, Entry>();

            //Assert
            Assert.NotNull(dto);
            Assert.Equal(id, dto.Id);
            Assert.NotEmpty(dto.Name);
            Assert.NotEmpty(dto.PhoneNumber);
        }