public int PostMplus(Model model)
 {
     int value = repository.GetMemory();
     value += model.Current;
     repository.SetMemory(value);
     return repository.GetMemory();
 }
Beispiel #2
0
 public void MyTestInitialize()
 {
     unityContainer = new UnityContainer();
     unityContainer.RegisterType<IServiceCalculatorMemory, ServiceCalculatorMemory>();
     unityContainer.RegisterType<ICalculatorMemoryRepository, CalculatorMemoryRepository>();
     IServiceCalculatorMemory service = unityContainer.Resolve<ServiceCalculatorMemory>();
     model = new Model();
     controller = new ValuesController(service);
 }
 public int PostMS(Model model)
 {
     repository.SetMemory(model.Current);
     return repository.GetMemory();
 }