first commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Xunit;
|
||||
using Moq;
|
||||
using Landmark.OLA.Application.Common.Domain;
|
||||
using Landmark.OLA.Application.Controllers;
|
||||
using Landmark.OLA.Application.DataAccess;
|
||||
using Landmark.OLA.Models.Loan;
|
||||
|
||||
namespace Landmark.OLA.Tests.Controllers
|
||||
{
|
||||
public class UiSettingsTest
|
||||
{
|
||||
[Fact]
|
||||
public void UiSettings_Returns_OK()
|
||||
{
|
||||
var _branchConfig = new BranchConfig
|
||||
{
|
||||
Id = "012345678901234567890123456789012345"
|
||||
};
|
||||
var mockRepo = new Mock<IBranchDataAccess>();
|
||||
mockRepo.Setup(repo => repo.GetBranchConfig()).Returns(_branchConfig);
|
||||
var mockRepo2 = new Mock<IConfigurationAccess>();
|
||||
|
||||
// arrange
|
||||
var controller = new UiSettingsController(new UiSettings(), mockRepo.Object, mockRepo2.Object);
|
||||
|
||||
// act
|
||||
var result = controller.Get();
|
||||
var okResult = result as OkObjectResult;
|
||||
|
||||
// assert
|
||||
Assert.NotNull(okResult);
|
||||
Assert.Equal(200, okResult.StatusCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user