Skip to content

Commit

Permalink
Added the DemographicFaker to the main faker classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Feb 6, 2019
1 parent 0a96500 commit 65b3e30
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 @@ -21,6 +21,7 @@ public static class Faker
public static ICommerceFaker Commerce { get; } = Container.Commerce;
public static ICompanyFaker Company { get; } = Container.Company;
public static IDateFaker Date { get; } = Container.Date;
public static IDemographicFaker Demographic { get; } = Container.Demographic;
public static IDragonBallFaker DragonBall { get; } = Container.DragonBall;
public static IEducatorFaker Educator { get; } = Container.Educator;
public static IFakeFaker Fake { get; } = Container.Fake;
Expand Down
3 changes: 3 additions & 0 deletions src/FakerDotNet/FakerContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ internal interface IFakerContainer
ICommerceFaker Commerce { get; }
ICompanyFaker Company { get; }
IDateFaker Date { get; }
IDemographicFaker Demographic { get; }
IDragonBallFaker DragonBall { get; }
IEducatorFaker Educator { get; }
IFakeFaker Fake { get; }
Expand Down Expand Up @@ -76,6 +77,7 @@ public FakerContainer()
Commerce = new CommerceFaker(this);
Company = new CompanyFaker(this);
Date = new DateFaker();
Demographic = new DemographicFaker(this);
DragonBall = new DragonBallFaker(this);
Educator = new EducatorFaker(this);
Fake = new FakeFaker(this);
Expand Down Expand Up @@ -129,6 +131,7 @@ public FakerContainer()
public ICommerceFaker Commerce { get; }
public ICompanyFaker Company { get; }
public IDateFaker Date { get; }
public IDemographicFaker Demographic { get; }
public IDragonBallFaker DragonBall { get; }
public IEducatorFaker Educator { get; }
public IFakeFaker Fake { 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 @@ -105,6 +105,12 @@ public void Date_returns_IDateFaker()
Assert.IsInstanceOf<IDateFaker>(_fakerContainer.Date);
}

[Test]
public void Demographic_returns_IDemographicFaker()
{
Assert.IsInstanceOf<IDemographicFaker>(_fakerContainer.Demographic);
}

[Test]
public void DragonBall_returns_IDragonBallFaker()
{
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 @@ -97,6 +97,12 @@ public void Date_returns_IDateFaker()
Assert.IsInstanceOf<IDateFaker>(Faker.Date);
}

[Test]
public void Demographic_returns_IDemographicFaker()
{
Assert.IsInstanceOf<IDemographicFaker>(Faker.Demographic);
}

[Test]
public void DragonBall_returns_IDragonBallFaker()
{
Expand Down

0 comments on commit 65b3e30

Please sign in to comment.