コード例 #1
0
        public void SetUp()
        {
            _loggingService = A.Fake<ILogService>();
            _tagService = A.Fake<ITagService>();
            _facebookService = A.Fake<IFacebookService>();
            _complaintSeverityService = A.Fake<IComplaintSeverityService>();
            _complaintService = A.Fake<IComplaintService>();
            _userService = A.Fake<IUserService>();
            _tagBuilder = A.Fake<ITagBuilder>();
            _complaintBuilder = A.Fake<IComplaintBuilder>();

            _controller = new ComplaintController(_facebookService, _loggingService, _tagService,
                _complaintSeverityService, _complaintService, _userService, _tagBuilder, _complaintBuilder);
        }
コード例 #2
0
        public void It_should_throw_an_exception_if_user_service_is_null()
        {
            Action creation = () => _controller = new ComplaintController(_facebookService, _loggingService, _tagService, _complaintSeverityService, _complaintService,
                null, _tagBuilder, _complaintBuilder);

            creation.ShouldThrow<ArgumentNullException>();
        }