コード例 #1
0
ファイル: DeleteActivity.cs プロジェクト: weiplanet/allReady
 public void ActivityDoesNotExist()
 {
     var context = ServiceProvider.GetService<AllReadyContext>();
     var query = new DeleteActivityCommand { ActivityId = 0 };
     var handler = new DeleteActivityCommandHandler(context);
     var result = handler.Handle(query);
 }
コード例 #2
0
 public void ActivityDoesNotExist()
 {
     var context = ServiceProvider.GetService<AllReadyContext>();
     var command = new DeleteActivityCommand { ActivityId = 0 };
     var handler = new DeleteActivityCommandHandler(context);
     handler.Handle(command);
     //TODO: this test needs to be completed to actually test something
 }
コード例 #3
0
ファイル: DeleteActivity.cs プロジェクト: weiplanet/allReady
        public void ExistingActivity()
        {
            var context = ServiceProvider.GetService<AllReadyContext>();
            var query = new DeleteActivityCommand { ActivityId = 1 };
            var handler = new DeleteActivityCommandHandler(context);
            var result = handler.Handle(query);

            var data = context.Activities.Count(_ => _.Id == 1);
            Assert.Equal(0, data);
        }