Tests Architechture.
This commit is contained in:
@@ -1,14 +1,50 @@
|
||||
using System;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Modbus.Net.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class BaseTest
|
||||
public sealed class TestAddresses
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestMethod1()
|
||||
private Dictionary<string, Tuple<int, int, int>[]> Addresses { get; } = new Dictionary<string, Tuple<int, int, int>[]>();
|
||||
|
||||
public Tuple<int, int, int>[] this[string index]
|
||||
{
|
||||
get { return Addresses[index]; }
|
||||
set
|
||||
{
|
||||
if (!Addresses.ContainsKey(index))
|
||||
{
|
||||
Addresses.Add(index, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Addresses[index] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TestAreas
|
||||
{
|
||||
private Dictionary<string, string[]> Areas { get; } = new Dictionary<string, string[]>();
|
||||
|
||||
public string[] this[string index]
|
||||
{
|
||||
get { return Areas[index]; }
|
||||
set
|
||||
{
|
||||
if (!Areas.ContainsKey(index))
|
||||
{
|
||||
Areas.Add(index, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Areas[index] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user