public void ThenThereShouldBeThreeSortersRegistered(int expectedCount) { var sorters = WithBootstrapper .WithSorters(); Assert.Equal(expectedCount, sorters.Count()); }
static void Main(string[] args) { WithBootstrapper .WithSorterFactoryInstance() .WithTextContent(args) .WithSorter(SorterType.All) .DisplayToConsole(); }
public void ThenTheSortersShouldSucceed(Contracts.Models.SorterType sorterType, string[] text, string[] expectedResult) { var result = WithBootstrapper .WithSorterFactoryInstance() .WithTextContent(text) .WithSorter(sorterType); Assert.Equal(result.Select(q => q.Key), expectedResult); }
public void ThenInvalidSortersShouldFail(FakeSorterType sorterType, string[] text) { try { var result = WithBootstrapper .WithSorterFactoryInstance() .WithTextContent(text) .WithSorter((SorterType)sorterType); } catch (Exception exception) { Assert.IsType <UnknownSorterException>(exception); } }
public void ThenThereShouldBeAtLeastOneSorter(Contracts.Models.SorterType sorterType) { try { WithBootstrapper .WithSorterFactoryInstance() .WithTextContent(null) .WithSorter(sorterType); } catch (Exception exception) { Assert.IsType <NullReferenceException>(exception); } }