Esempio n. 1
0
        public async Task ShouldDelete()
        {
            using (var server = CreateServer())
            {
                IAppDbContext context = server.Host.Services.GetService(typeof(IAppDbContext)) as IAppDbContext;

                context.Behaviours.Add(new Behaviour()
                {
                    Name        = "Running",
                    Description = "Running",
                    Slug        = "slug"
                });

                await context.SaveChangesAsync(default(CancellationToken));

                var response = await server.CreateClient()
                               .DeleteAsync(Delete.Behaviour(1));

                response.EnsureSuccessStatusCode();
            }
        }