public async void Update_Entity_Is_Not_Tracked() { Mock <ILogger <ActionTemplateVersionRepository> > loggerMoc = ActionTemplateVersionRepositoryMoc.GetLoggerMoc(); ApplicationDbContext context = ActionTemplateVersionRepositoryMoc.GetContext(); var repository = new ActionTemplateVersionRepository(loggerMoc.Object, context); ActionTemplateVersion entity = new ActionTemplateVersion(); context.Set <ActionTemplateVersion>().Add(entity); await context.SaveChangesAsync(); await repository.Update(new ActionTemplateVersion()); var modifiedRecord = context.Set <ActionTemplateVersion>().FirstOrDefaultAsync(); modifiedRecord.Should().NotBeNull(); }