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

            Assert.Equal(expectedCount, sorters.Count());
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     WithBootstrapper
     .WithSorterFactoryInstance()
     .WithTextContent(args)
     .WithSorter(SorterType.All)
     .DisplayToConsole();
 }
Esempio n. 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);
        }
Esempio n. 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);
     }
 }
Esempio n. 5
0
 public void ThenThereShouldBeAtLeastOneSorter(Contracts.Models.SorterType sorterType)
 {
     try
     {
         WithBootstrapper
         .WithSorterFactoryInstance()
         .WithTextContent(null)
         .WithSorter(sorterType);
     }
     catch (Exception exception)
     {
         Assert.IsType <NullReferenceException>(exception);
     }
 }