Example #1
0
        public void Create()
        {
            var repository = new Mock <IDeletableEntityRepository <Question> >();
            var service    = new QuestionsService(repository.Object);

            _ = service.CreateAsync("Title", "Test", "1");

            Assert.Equal(2, repository.Invocations.Count);

            repository.Verify(x => x.All(), Times.Once);
        }
 private async Task PrepareQuestionAsync(QuestionsService service)
 {
     await service.CreateAsync("test title", "test content", this.stylist.Id, this.client.Id);
 }