Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Group and RepoInfo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j2ghz committed Jul 3, 2018
1 parent 94260ca commit 7598af9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ModSink.Common.Tests/Models/Group/GroupTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using Bogus;

namespace ModSink.Common.Tests.Models.Group
{
public class GroupTests : TestWithFaker<Common.Models.Group.Group>
{
public static Faker<Common.Models.Group.Group> GroupFaker = new Faker<Common.Models.Group.Group>()
.StrictMode(true)
.RuleFor(g => g.BaseUri, f => new Uri(f.Internet.UrlWithPath()))
.RuleFor(g => g.RepoInfos, _ => RepoInfoTests.RepoInfoFaker.Generate(3));

public override Faker<Common.Models.Group.Group> Faker { get; } = GroupFaker;
}
}
14 changes: 14 additions & 0 deletions src/ModSink.Common.Tests/Models/Group/RepoInfoTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Bogus;
using ModSink.Common.Models.Group;

namespace ModSink.Common.Tests.Models.Group
{
public class RepoInfoTests : TestWithFaker<RepoInfo>
{
public static Faker<RepoInfo> RepoInfoFaker = new Faker<RepoInfo>().StrictMode(true)
.RuleFor(r => r.Uri, f => new Uri(f.Internet.UrlWithPath()));

public override Faker<RepoInfo> Faker { get; } = RepoInfoFaker;
}
}

0 comments on commit 7598af9

Please sign in to comment.