using Edge.Core.Processor.Dispatcher;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edge.Core.Test
{
[TestClass]
public class GenerateJsonSchemaTest
{
public class PumpGroupParameter
{
public enum PumpModelEnum
{
// for all cases, this type of dispenser, like totalizer, amount, price data fields and etc., has smaller value range
Model_664 = 0,
// for all cases, this type of dispenser, like totalizer, amount, price data fields and etc., has wider value range
Model_886 = 1
}
public enum PumpAuthorizeModeEnum
{
///
/// in this mode, dispenser need get fc authorized then can start fueling.
///
FC_Authorize = 0,
///
/// in this mode, dispenser can start fueling without authorize from fc, so lift nozzle, fueling start.
///
Pump_Self_Authorize = 1,
}
public class PumpParameter
{
public int PumpId { get; set; }
///
/// setup in physical dispenser side.
///
public byte Address { get; set; }
public PumpModelEnum? PumpModel { get; set; } = PumpModelEnum.Model_664;
public PumpAuthorizeModeEnum? PumpAuthorizeMode { get; set; } = PumpAuthorizeModeEnum.FC_Authorize;
public int? AmountDecimalDigits { get; set; } = 2;
public int? VolumeDecimalDigits { get; set; } = 2;
public int? PriceDecimalDigits { get; set; } = 2;
public int? VolumeTotalizerDecimalDigits { get; set; } = 2;
}
public IEnumerable PumpParameters { get; set; }
}
[TestMethod]
public void TestMethod2()
{
var s = ObjectInstanceCreator.GetJsonSchemaString(typeof(PumpGroupParameter));
}
[TestMethod]
public void TestMethod3()
{
var s = ObjectInstanceCreator.GetJsonSchemaString(new List() { typeof(PumpGroupParameter), typeof(string) });
}
}
}