public void GenerateModel() { var articleTree = new ArticleTree(); var parameterSet = ParameterSet.Create(ParameterSet.Defaults); var dataBase = parameterSet.GetOption <DataBase <ProductionDomainContext> >(); // Your Method. articleTree.Create(parameterSet); Assert.True(dataBase.DbContext.ResourceCapabilities.Count() != 0); }