25 lines
560 B
C#
25 lines
560 B
C#
using System.Threading.Tasks;
|
|
using BroseCumulativeReport;
|
|
using Moq;
|
|
using Xunit;
|
|
|
|
namespace BroseCumulativeReport.Tests
|
|
{
|
|
public class IAppTests
|
|
{
|
|
[Fact]
|
|
public async Task RunAsync_ShouldBeAwaitable()
|
|
{
|
|
// Arrange
|
|
var mockApp = new Mock<IApp>();
|
|
mockApp.Setup(app => app.RunAsync()).Returns(Task.CompletedTask).Verifiable();
|
|
|
|
// Act
|
|
await mockApp.Object.RunAsync();
|
|
|
|
// Assert
|
|
mockApp.Verify(v => v.RunAsync(), Times.Once);
|
|
}
|
|
}
|
|
}
|