コード例 #1
0
        public void Add_simulate_goals_month_should()
        {
            // Arrange
            var vm = LoadJson <SimulateGoalVM>("SimulateMonthGoal");

            _mockMediator.Setup(x => x.Send(It.IsAny <CreateRequest <SimulateGoalVM> >(), default(CancellationToken))).ReturnsAsync(vm);

            // Action
            var _sut   = new WalletService(_mockMediator.Object);
            var result = _sut.AddAsync(vm).Result;

            _sut.Dispose();

            // Assert
            Assert.NotNull(result);
        }