public void AddAbsorbingModuleShouldThrowError() { var container = new ModuleContainer(10); IAbsorbingModule absorbingModule = null; Assert.Throws <ArgumentException>(() => container.AddAbsorbingModule(absorbingModule)); }
public void AddAbsorbingModule(IAbsorbingModule absorbingModule) { if (absorbingModule == null) { throw new ArgumentException(); } if (this.ModulesByInput.Count == this.moduleCapacity) { this.RemoveOldestModule(); } this.absorbingModules.Add(absorbingModule.Id, absorbingModule); this.modulesByInput.Add(absorbingModule); }
public void AddAbsorbingModule(IAbsorbingModule absorbingModule) { if (absorbingModule == null) { throw new ArgumentException(string.Format(Constants.ModuleNullErrorMessage)); } if (this.ModulesByInput.Count == this.moduleCapacity) { this.RemoveOldestModule(); } this.absorbingModules.Add(absorbingModule.Id, absorbingModule); this.modulesByInput.Add(absorbingModule); }
public void AddAbsorbingModule(IAbsorbingModule absorbingModule) { this.moduleContainer.AddAbsorbingModule(absorbingModule); }
public void AddAbsorbingModule(IAbsorbingModule absorbingModule) { this.moduleContainer.AddEnergyModule((IEnergyModule)absorbingModule); }