public void SetUp() { _memoryStore = new InMemoryBackingStore(); _bucket = ContentBucket.Default("My Bucket"); _memoryStore.Save(User.Default); _memoryStore.Save(_bucket); _item = new ContentItem(User.Default.ToRef()) { Metadata = { Title = "Some post" }, Body = "Some content" }; }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.Configure <CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.None; }); var contentStore = new InMemoryBackingStore(); services.AddSingleton(factory => new ContentClient(contentStore)); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); }