public void CanGetCategory()
        {
            // ARRANGE
            var expectedCategoryDto = Substitute.For <CategoryDto>();
            var expectedId          = Guid.NewGuid();

            _noteTaker.GetCategoryDetail(Arg.Any <SecurityContext>(), expectedId).Returns(expectedCategoryDto);

            // ACT
            var result = _subjectUnderTest.Get(expectedId);

            // ASSERT
            Assert.That(result, Is.Not.Null);
            _noteTaker.Received(1).GetCategoryDetail(Arg.Any <SecurityContext>(), expectedId);
        }
Пример #2
0
        public IActionResult Get(Guid id)
        {
            var categoryDto = _noteTaker.GetCategoryDetail(SecurityContext, id);

            return(Ok(categoryDto));
        }