67 lines
2.7 KiB
C#
67 lines
2.7 KiB
C#
using LCU.Api.Internal.MaidBotLib.Models;
|
|
using LCU.Api.Internal.MaidBotLib.Repositories;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Xunit;
|
|
|
|
namespace LCU.Api.Internal.MaidBotTests.RepositoryTests
|
|
{
|
|
public class LoggingMatrixRepositoryTest : DbContextFromJsonTest
|
|
{
|
|
private readonly LoggingMatrixRepository _loggingMatrixRepository;
|
|
private const string JsonTestDataFilePath = "RepositoryTests\\LoggingMatrixTestData.json";
|
|
|
|
public LoggingMatrixRepositoryTest()
|
|
{
|
|
var dbContext = GetContextWithData(JsonTestDataFilePath);
|
|
_loggingMatrixRepository = new LoggingMatrixRepository(dbContext);
|
|
}
|
|
|
|
//TODO: These UnitTest have been commented out since there is version mismatch and at this time
|
|
// we are not going to undergo the work that is required to upgrade. The work to upgrade
|
|
// the .net version will need to be done in a separate Story:
|
|
// 89988 Maidbot API > Library Modernization
|
|
// https://landmarkcu.visualstudio.com/LMCU/_boards/board/t/Development/Stories?workitem=89988.
|
|
// This decision was made during this PR:
|
|
// https://landmarkcu.visualstudio.com/Platform/_git/LCU.API.Internal.MaidBotApi/pullrequest/17634
|
|
//[Fact]
|
|
//public void ListAsync_Test()
|
|
//{
|
|
// var loggingMatrixes = _loggingMatrixRepository.ListAsync().Result;
|
|
// Assert.NotNull(loggingMatrixes);
|
|
// Assert.Equal(6, loggingMatrixes.Count());
|
|
//}
|
|
|
|
//[Fact]
|
|
//public async void FindById_Test()
|
|
//{
|
|
// var loggingMatrix = await _loggingMatrixRepository.FindByIdAsync(1);
|
|
// Assert.NotNull(loggingMatrix);
|
|
// Assert.Equal(1, loggingMatrix.LoggingMatrixId);
|
|
//}
|
|
|
|
//[Fact]
|
|
//public void RetrieveByApplicationLevelAndGroup_Test()
|
|
//{
|
|
// var application = "Test App 1";
|
|
// var group = "Test Group 1";
|
|
// var level = "Test Level 1";
|
|
// var loggingMatrixes = _loggingMatrixRepository.RetrieveByApplicationLevelAndGroup(application, level, group ).Result;
|
|
// Assert.NotNull(loggingMatrixes);
|
|
// Assert.Equal(2, loggingMatrixes.Count());
|
|
//}
|
|
|
|
//[Fact]
|
|
//public void RetrieveByApplciationAndLevel_Test()
|
|
//{
|
|
// var application = "Test App 1";
|
|
// var level = "Test Level 1";
|
|
// var loggingMatrixes = _loggingMatrixRepository.RetrieveByApplciationAndLevel(application, level).Result;
|
|
// Assert.NotNull(loggingMatrixes);
|
|
// Assert.Equal(3, loggingMatrixes.Count());
|
|
//}
|
|
}
|
|
}
|