Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed Oct 11, 2024
1 parent c872a5b commit 49cbbe0
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ namespace RepoM.ActionMenu.Core.Tests.Model;
using FluentAssertions;
using System.IO.Abstractions;
using System;
using System.Linq;
using System.Threading.Tasks;
using RepoM.ActionMenu.Core.Abstractions;
using RepoM.ActionMenu.Core.Misc;
using Xunit;
Expand Down Expand Up @@ -35,4 +37,23 @@ public void Ctor_ShouldThrow_WhenArgumentNull()
act5.Should().Throw<ArgumentNullException>();
act6.Should().Throw<ArgumentNullException>();
}

[Fact]
public async Task AddActionMenusAsync_ShouldDoNothing_WhenArgumentIsNull()
{
// arrange
var sut = new ActionMenuGenerationContext(
A.Dummy<ITemplateParser>(),
A.Dummy<Core.Abstractions.OperatingSystem>(),
[],
[],
A.Dummy<IActionMenuDeserializer>(),
[]);

// act
var result = await sut.AddActionMenusAsync(null!).ToListAsync();

// assert
result.Should().BeEmpty();
}
}

0 comments on commit 49cbbe0

Please sign in to comment.