Skip to content

Commit

Permalink
add test class
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed Aug 6, 2023
1 parent c497c23 commit e8d6224
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/RepoM.Api.Tests/BootstrapperTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace RepoM.Api.Tests;

using FakeItEasy;
using RepoM.Api.Plugins;
using System;
using System.IO.Abstractions;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Xunit;

public class BootstrapperTests
{
[Fact]
public void Ctor_ShouldThrow_WhenArgumentNull()
{
// arrange

// act
Func<CoreBootstrapper> act1 = () => new CoreBootstrapper(A.Dummy<IPluginFinder>(), A.Dummy<IFileSystem>(), null!);
Func<CoreBootstrapper> act2 = () => new CoreBootstrapper(A.Dummy<IPluginFinder>(), null!, A.Dummy<ILoggerFactory>());
Func<CoreBootstrapper> act3 = () => new CoreBootstrapper(null!, A.Dummy<IFileSystem>(), A.Dummy<ILoggerFactory>());

// assert
act1.Should().Throw<ArgumentNullException>();
act2.Should().Throw<ArgumentNullException>();
act3.Should().Throw<ArgumentNullException>();
}
}

0 comments on commit e8d6224

Please sign in to comment.