using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using EVCB_OCPP.Packet.Messages.SubTypes; namespace EVCB_OCPP.WSServer.BusinessService { public class FakeLocalBusinessService : IBusinessService { Dictionary localAuthDic = new Dictionary() { { "AC5CDC3D", new IdTagInfo(){ status= AuthorizationStatus.Invalid} }, { "48C4CBD9257A", new IdTagInfo(){ status= AuthorizationStatus.Invalid} }, { "3DDC5CAC", new IdTagInfo(){ status= AuthorizationStatus.Invalid} }, { "3EFBDEAC", new IdTagInfo(){ status= AuthorizationStatus.Invalid} }, }; string customerId = string.Empty; public FakeLocalBusinessService(string customerId) { this.customerId = customerId; } public IdTagInfo Authorize(string idTag) { IdTagInfo result = new IdTagInfo() { status = AuthorizationStatus.Accepted }; if (localAuthDic.ContainsKey(idTag)) { result = localAuthDic[idTag]; } return result; } } }