Skip to content

Commit

Permalink
Added the CoffeeFaker to the main faker classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Jan 27, 2019
1 parent e473200 commit 9f31f6f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/FakerDotNet/Faker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static class Faker
public static IBusinessFaker Business { get; } = Container.Business;
public static ICatFaker Cat { get; } = Container.Cat;
public static IChuckNorrisFaker ChuckNorris { get; } = Container.ChuckNorris;
public static ICoffeeFaker Coffee { get; } = Container.Coffee;
public static IColorFaker Color { get; } = Container.Color;
public static ICompanyFaker Company { get; } = Container.Company;
public static IDateFaker Date { get; } = Container.Date;
Expand Down
3 changes: 3 additions & 0 deletions src/FakerDotNet/FakerContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal interface IFakerContainer
IBusinessFaker Business { get; }
ICatFaker Cat { get; }
IChuckNorrisFaker ChuckNorris { get; }
ICoffeeFaker Coffee { get; }
IColorFaker Color { get; }
ICompanyFaker Company { get; }
IDateFaker Date { get; }
Expand Down Expand Up @@ -55,6 +56,7 @@ public FakerContainer()
Business = new BusinessFaker(this);
Cat = new CatFaker(this);
ChuckNorris = new ChuckNorrisFaker(this);
Coffee = new CoffeeFaker(this);
Color = new ColorFaker(this);
Company = new CompanyFaker(this);
Date = new DateFaker();
Expand Down Expand Up @@ -92,6 +94,7 @@ public FakerContainer()
public IBusinessFaker Business { get; }
public ICatFaker Cat { get; }
public IChuckNorrisFaker ChuckNorris { get; }
public ICoffeeFaker Coffee { get; }
public IColorFaker Color { get; }
public ICompanyFaker Company { get; }
public IDateFaker Date { get; }
Expand Down
6 changes: 6 additions & 0 deletions tests/FakerDotNet.Tests/FakerContainerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public void ChuckNorris_returns_IChuckNorrisFaker()
Assert.IsInstanceOf<IChuckNorrisFaker>(_fakerContainer.ChuckNorris);
}

[Test]
public void Coffee_returns_ICoffeeFaker()
{
Assert.IsInstanceOf<ICoffeeFaker>(_fakerContainer.Coffee);
}

[Test]
public void Color_returns_IColorFaker()
{
Expand Down
6 changes: 6 additions & 0 deletions tests/FakerDotNet.Tests/FakerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public void ChuckNorris_returns_IChuckNorrisFaker()
Assert.IsInstanceOf<IChuckNorrisFaker>(Faker.ChuckNorris);
}

[Test]
public void Coffee_returns_ICoffeeFaker()
{
Assert.IsInstanceOf<ICoffeeFaker>(Faker.Coffee);
}

[Test]
public void Color_returns_IColorFaker()
{
Expand Down

0 comments on commit 9f31f6f

Please sign in to comment.