示例#1
0
        private Dictionary <Node, G_CounterService> CreateReplicas(List <Node> nodes)
        {
            var dictionary = new Dictionary <Node, G_CounterService>();

            foreach (var node in nodes)
            {
                var repository = new G_CounterRepository();
                var service    = new G_CounterService(repository);

                dictionary.Add(node, service);
            }

            return(dictionary);
        }
示例#2
0
        private Dictionary <Node, CRDT.Application.Convergent.Counter.G_CounterService> CreateConvergentReplicas(List <Node> nodes)
        {
            var dictionary = new Dictionary <Node, CRDT.Application.Convergent.Counter.G_CounterService>();

            foreach (var node in nodes)
            {
                var repository = new G_CounterRepository();
                var service    = new CRDT.Application.Convergent.Counter.G_CounterService(repository);

                dictionary.Add(node, service);
            }

            return(dictionary);
        }
 public G_CounterServiceTests()
 {
     _repository = new G_CounterRepository();
     _service    = new G_CounterService(_repository);
 }
示例#4
0
 public G_CounterServiceTests(ITestOutputHelper output)
 {
     _repository = new G_CounterRepository();
     _service    = new G_CounterService(_repository);
     _output     = output;
 }