Beispiel #1
0
        public ETAPU11Fixture()
        {
            // Set the default culture.
            CultureInfo.CurrentCulture = new CultureInfo("en-US");

            var loggerFactory = new LoggerFactory();
            var logger        = loggerFactory.CreateLogger <ETAPU11>();

            var configuration = new ConfigurationBuilder()
                                .SetBasePath(AppContext.BaseDirectory)
                                .AddJsonFile("appsettings.json", false, false)
                                .AddUserSecrets <Startup>(true)
                                .Build();

            configuration.GetSection("AppSettings").Bind(Settings);

            ETAPU11 = new ETAPU11(logger, new TcpClient()
            {
                TcpMaster = new TcpMasterData(),
                TcpSlave  = new TcpSlaveData()
                {
                    Address = Settings.TcpSlave.Address,
                    Port    = Settings.TcpSlave.Port,
                    ID      = Settings.TcpSlave.ID
                }
            });

            ETAPU11.ReadAllAsync().Wait();
        }
Beispiel #2
0
 public void TestProperty(string property)
 {
     Assert.True(ETAPU11.IsProperty(property));
     Assert.NotNull(_etapu11.GetPropertyValue(property));
 }