@Test public void testCreateLocalState() throws DbException { Transaction txn = new Transaction(null, false); context.checking(new Expectations() {{ oneOf(identityManager).getLocalAuthor(txn); will(returnValue(blog1.getAuthor())); oneOf(blogFactory).createBlog(blog1.getAuthor()); will(returnValue(blog1)); oneOf(db).addGroup(txn, blog1.getGroup()); }}); blogManager.createLocalState(txn); context.assertIsSatisfied(); }
@Override public void createLocalState(Transaction txn) throws DbException { LocalAuthor a = identityManager.getLocalAuthor(txn); Blog b = blogFactory.createBlog(a); db.addGroup(txn, b.getGroup()); }
BlogManagerImpl extends BdfIncomingMessageHook implements BlogManager,
		ContactHook, Client { @Override public void createLocalState(Transaction txn) throws DbException { LocalAuthor a = identityManager.getLocalAuthor(txn); Blog b = blogFactory.createBlog(a); db.addGroup(txn, b.getGroup()); } }
BlogManagerImpl extends BdfIncomingMessageHook implements BlogManager,
		ContactHook, Client { @Override public void createLocalState(Transaction txn) throws DbException { LocalAuthor a = identityManager.getLocalAuthor(txn); Blog b = blogFactory.createBlog(a); db.addGroup(txn, b.getGroup()); } @Inject  BlogManagerImpl(DatabaseComponent db, IdentityManager identityManager,
			ClientHelper clientHelper, MetadataParser metadataParser,
			BlogFactory blogFactory, BlogPostFactory blogPostFactory); }
BlogManagerImpl extends BdfIncomingMessageHook implements BlogManager,
		ContactHook, Client { @Override public void createLocalState(Transaction txn) throws DbException { LocalAuthor a = identityManager.getLocalAuthor(txn); Blog b = blogFactory.createBlog(a); db.addGroup(txn, b.getGroup()); } @Inject  BlogManagerImpl(DatabaseComponent db, IdentityManager identityManager,
			ClientHelper clientHelper, MetadataParser metadataParser,
			BlogFactory blogFactory, BlogPostFactory blogPostFactory); @Override void createLocalState(Transaction txn); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override void addBlog(Blog b); @Override void addBlog(Transaction txn, Blog b); @Override boolean canBeRemoved(Blog b); @Override void removeBlog(Blog b); @Override void removeBlog(Transaction txn, Blog b); @Override void addLocalPost(BlogPost p); @Override void addLocalPost(Transaction txn, BlogPost p); @Override void addLocalComment(LocalAuthor author, GroupId groupId,
			@Nullable String comment, BlogPostHeader parentHeader); @Override Blog getBlog(GroupId g); @Override Blog getBlog(Transaction txn, GroupId g); @Override Collection<Blog> getBlogs(LocalAuthor localAuthor); @Override Blog getPersonalBlog(Author author); @Override Collection<Blog> getBlogs(); @Override BlogPostHeader getPostHeader(GroupId g, MessageId m); @Override String getPostBody(MessageId m); @Override Collection<BlogPostHeader> getPostHeaders(GroupId g); @Override void setReadFlag(MessageId m, boolean read); @Override void registerRemoveBlogHook(RemoveBlogHook hook); }
BlogManagerImpl extends BdfIncomingMessageHook implements BlogManager,
		ContactHook, Client { @Override public void createLocalState(Transaction txn) throws DbException { LocalAuthor a = identityManager.getLocalAuthor(txn); Blog b = blogFactory.createBlog(a); db.addGroup(txn, b.getGroup()); } @Inject  BlogManagerImpl(DatabaseComponent db, IdentityManager identityManager,
			ClientHelper clientHelper, MetadataParser metadataParser,
			BlogFactory blogFactory, BlogPostFactory blogPostFactory); @Override void createLocalState(Transaction txn); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override void addBlog(Blog b); @Override void addBlog(Transaction txn, Blog b); @Override boolean canBeRemoved(Blog b); @Override void removeBlog(Blog b); @Override void removeBlog(Transaction txn, Blog b); @Override void addLocalPost(BlogPost p); @Override void addLocalPost(Transaction txn, BlogPost p); @Override void addLocalComment(LocalAuthor author, GroupId groupId,
			@Nullable String comment, BlogPostHeader parentHeader); @Override Blog getBlog(GroupId g); @Override Blog getBlog(Transaction txn, GroupId g); @Override Collection<Blog> getBlogs(LocalAuthor localAuthor); @Override Blog getPersonalBlog(Author author); @Override Collection<Blog> getBlogs(); @Override BlogPostHeader getPostHeader(GroupId g, MessageId m); @Override String getPostBody(MessageId m); @Override Collection<BlogPostHeader> getPostHeaders(GroupId g); @Override void setReadFlag(MessageId m, boolean read); @Override void registerRemoveBlogHook(RemoveBlogHook hook);  }