public CombatStatisticsContainer(ICurrentCombatStatisticsChangedEventArgsFactory currentCombatStatisticsChangedEventArgsFactory) { Guard.WhenArgument(currentCombatStatisticsChangedEventArgsFactory, nameof(ICurrentCombatStatisticsChangedEventArgsFactory)).IsNull().Throw(); this.currentCombatStatisticsChangedEventArgsFactory = currentCombatStatisticsChangedEventArgsFactory; this.AllCombatStatistics = new LinkedList <ICombatStatistics>(); }
public void ThrowArgumentNullException_WhenICurrentCombatStatisticsChangedEventArgsFactoryParameterIsNull() { // Arrange ICurrentCombatStatisticsChangedEventArgsFactory currentCombatStatisticsChangedEventArgsFactory = null; // Act & Assert Assert.That( () => new CombatStatisticsContainer(currentCombatStatisticsChangedEventArgsFactory), Throws.InstanceOf <ArgumentNullException>().With.Message.Contains(nameof(ICurrentCombatStatisticsChangedEventArgsFactory))); }
public MockCombatStatisticsContainer(ICurrentCombatStatisticsChangedEventArgsFactory currentCombatStatisticsChangedEventArgsFactory) : base(currentCombatStatisticsChangedEventArgsFactory) { }