Esempio n. 1
0
 public void ActivityDoesNotExist()
 {
     var context = ServiceProvider.GetService<AllReadyContext>();
     var query = new DeleteActivityCommand { ActivityId = 0 };
     var handler = new DeleteActivityCommandHandler(context);
     var result = handler.Handle(query);
 }
 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
 }
Esempio n. 3
0
        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);
        }