Liam Pietralla
f577617b4d
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
31 lines
785 B
C#
31 lines
785 B
C#
using YaleAccess.Models;
|
|
using YaleAccess.Services.Interfaces;
|
|
|
|
namespace YaleAccess.Services
|
|
{
|
|
public class MockYaleAccessor : IYaleAccessor
|
|
{
|
|
private readonly MockYaleData _data;
|
|
|
|
public MockYaleAccessor(MockYaleData data)
|
|
{
|
|
_data = data;
|
|
}
|
|
|
|
public Task<YaleUserCode> GetCodeInformationAsync(int userCodeId)
|
|
{
|
|
return Task.FromResult(_data.GetUserCode(userCodeId));
|
|
}
|
|
|
|
public Task<bool> SetCodeAsAvailable(int userCode)
|
|
{
|
|
return Task.FromResult(_data.SetUserCodeAsAvailable(userCode));
|
|
}
|
|
|
|
public Task<bool> SetUserCode(int userCodeId, string code)
|
|
{
|
|
return Task.FromResult(_data.SetUserCode(userCodeId, code));
|
|
}
|
|
}
|
|
}
|