public void Charge_SourceIsInvalid_ThrowsArgumentException([Values(null, "", " ")] String source, [Values(null, true, false)] Boolean?reverse) { IBitCharger instance = this.CreateInstance(); if (reverse.HasValue) { Assert.That(() => instance.Charge(source, reverse.Value), Throws.ArgumentException); } else { Assert.That(() => instance.Charge(source), Throws.ArgumentException); } }
public void Charge_SourceWithWrongLength_ReverseContentAsExpected(String source, String expected) { IBitCharger instance = this.CreateInstance(); instance.Charge(source, true); Assert.That(instance.Content, Is.EqualTo(expected)); }
public void Charge_SourceMatchesEightBitRestrictionButContainsInvalidCharacters_ContentAsExpected(String source, String expected) { IBitCharger instance = this.CreateInstance(); instance.Charge(source); Assert.That(instance.Content, Is.EqualTo(expected)); }
public void Charge_SourceContainsControlCharactersOnly_ThrowsArgumentException(String source) { IBitCharger instance = this.CreateInstance(); Assert.That(() => instance.Charge(source), Throws.ArgumentException); }