Beispiel #1
0
        public void ThenThereShouldBeThreeSortersRegistered(int expectedCount)
        {
            var sorters = WithBootstrapper
                          .WithSorters();

            Assert.Equal(expectedCount, sorters.Count());
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     WithBootstrapper
     .WithSorterFactoryInstance()
     .WithTextContent(args)
     .WithSorter(SorterType.All)
     .DisplayToConsole();
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 public void ThenInvalidSortersShouldFail(FakeSorterType sorterType, string[] text)
 {
     try
     {
         var result = WithBootstrapper
                      .WithSorterFactoryInstance()
                      .WithTextContent(text)
                      .WithSorter((SorterType)sorterType);
     }
     catch (Exception exception)
     {
         Assert.IsType <UnknownSorterException>(exception);
     }
 }
Beispiel #5
0
 public void ThenThereShouldBeAtLeastOneSorter(Contracts.Models.SorterType sorterType)
 {
     try
     {
         WithBootstrapper
         .WithSorterFactoryInstance()
         .WithTextContent(null)
         .WithSorter(sorterType);
     }
     catch (Exception exception)
     {
         Assert.IsType <NullReferenceException>(exception);
     }
 }