public void ValidateFailRangeTest() { //pass count value > max PassCountSettings settings = PassCountSettings.CreatePassCountSettings(new[] { 1, 2, int.MaxValue }); Assert.ThrowsException <ServiceException>(() => settings.Validate()); }
public void ValidateFailOrderTest() { //pass counts out of order PassCountSettings settings = PassCountSettings.CreatePassCountSettings(new[] { 1, 10, 5, 12, 3 }); Assert.ThrowsException <ServiceException>(() => settings.Validate()); }
public void ValidateFailLengthTest() { //empty array PassCountSettings settings = PassCountSettings.CreatePassCountSettings(new int[] {}); Assert.ThrowsException <ServiceException>(() => settings.Validate()); }
public void ValidateFailFirstTest() { //doesn't start at 0 PassCountSettings settings = PassCountSettings.CreatePassCountSettings(new[] { 0, 5, 10 }); Assert.ThrowsException <ServiceException>(() => settings.Validate()); }
public void ValidateSuccessTest() { PassCountSettings settings = PassCountSettings.CreatePassCountSettings(new[] { 1, 3, 5, 10 }); settings.Validate(); }