Skip to content

hattan/BeanSprout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeanSprout alt tag

A data mocking tool for .NET applications.

BeanSprout automatically creates a concrete instance of your repository interfaces and generates fake data. This is useful for generating design time data.

  public interface IFoo
  {
      IEnumerable<Foo> GetFoos();
  }

  public class Foo
  {
      public int Id { get; set; }

      [FullName]
      public string Name { get; set; }

      [Static("Foo123")]
      public string Custom { get; set; }
    }

 var implementation = BS.Sprout<IFoo>(size);
 IEnumerable<Foo> data = implementation.GetFoos();

Currently BeanSprout works off of specific convetions.

  • It assumes that you are passing in an interface and will also only mock interface methods that return IEnumerable.
  • BeanSprout will do a shallow data mock. Complex nested model support will come in a future release.

###Future Enhancements

  • Add support for multiple return types, not just IEnumerable.
  • Support for Deep complex models.
  • Support for RegEx DataTypes(model property attributes).

Installation

Install BeanSprout via Nuget https://www.nuget.org/packages/BeanSprout/

About

A data mocking tool for .NET applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages