Technical: Renamed method

Technical: Renamed method

--- StatePrinter.Tests/PerformanceTests/ManySmallObjects.cs
+++ StatePrinter.Tests/PerformanceTests/ManySmallObjects.cs
@@ -47,7 +47,7 @@
       var printer = new Stateprinter();

       printer.PrintObject(toPrint);
-      var mills = time(
+      var mills = Time(
         () =>
           {
             for (int i = 0; i < N; i++)
@@ -90,7 +90,7 @@

       var cfg = ConfigurationHelper.GetStandardConfiguration();
       cfg.OutputFormatter = new JsonStyle(cfg.IndentIncrement);
-      var mills = time(() =>
+      var mills = Time(() =>
                        {
                          var printer = new Stateprinter(cfg);
                          printer.PrintObject(x);


Updated intro text to match prototype

Updated intro text to match prototype

--- src/SFA.DAS.EmployerApprenticeshipsService.Web/Views/EmployerCommitments/Submit.cshtml
+++ src/SFA.DAS.EmployerApprenticeshipsService.Web/Views/EmployerCommitments/Submit.cshtml
@@ -4,10 +4,10 @@

-
Submit commitment

+
Add a note

-
You are about to send your commitment to your training provider. Once you send it they will be able to see it in their online account.

-
You can add a note for your training provider to read.

+
You're about to send a request to your training provider, asking them to add one or more apprentices to your cohort. Once you send it, they'll be able to see your request in their online account.

+
Before you send your request, you can add a note for your training provider to read.

         <form method="POST" action="@Url.Action("Submit")">

@@ -25,7 +25,7 @@

-                Note
+                Note (optional)

For example, please add the 25 engineers we agreed on contract #30815

                 <textarea class="form-control form-control-3-4" id="Message" name="Message"
                           cols="40" rows="10"
@@ -33,10 +33,7 @@

                 <input type="hidden" id="accountId" name="accountId" value="@Model.SubmitCommitmentModel.AccountId" />
                 <input type="hidden" id="commitmentId" name="commitmentId" value="@Model.SubmitCommitmentModel.CommitmentId" />
-                <button type="submit" class="button">Send to provider</button>
+                <button type="submit" class="button">Send request to provider</button>
             </form>

-
-
-


Fixed Client ID/Secret cursor

Fixed Client ID/Secret cursor

--- src/Orchard.Web/Modules/Devoffice.GettingStarted/Views/O365/_AppRegistrationForm.cshtml
+++ src/Orchard.Web/Modules/Devoffice.GettingStarted/Views/O365/_AppRegistrationForm.cshtml
@@ -114,11 +114,11 @@

         Client ID:
-        <input id="clientIdField" class="form-control" type="text" name="clientId" value="" disabled />
+        <input id="clientIdField" class="form-control" type="text" name="clientId" value="" readonly style="cursor: text" />

         Client Secret:
-        <input id="clientSecretField" class="form-control" type="text" name="clientSecret" value="" disabled />
+        <input id="clientSecretField" class="form-control" type="text" name="clientSecret" value="" readonly style="cursor: text" />


cancellation token parameters added

cancellation token parameters added

--- TIKSN.Core/Finance/ForeignExchange/Bank/BankOfCanada.cs
+++ TIKSN.Core/Finance/ForeignExchange/Bank/BankOfCanada.cs
@@ -7,6 +7,7 @@
 using System.IO;
 using System.Linq;
 using System.Net.Http;
+using System.Threading;
 using System.Threading.Tasks;
 using TIKSN.Globalization;

@@ -35,22 +36,22 @@
             _currencyFactory = currencyFactory;
         }

-        public async Task<Money> ConvertCurrencyAsync(Money baseMoney, CurrencyInfo counterCurrency, DateTimeOffset asOn)
+        public async Task<Money> ConvertCurrencyAsync(Money baseMoney, CurrencyInfo counterCurrency, DateTimeOffset asOn, CancellationToken cancellationToken)
         {
             var pair = new CurrencyPair(baseMoney.Currency, counterCurrency);

-            var rate = await this.GetExchangeRateAsync(pair, asOn);
+            var rate = await this.GetExchangeRateAsync(pair, asOn, cancellationToken);

             return new Money(counterCurrency, baseMoney.Amount * rate);
         }

-        public async Task<IEnumerable<ExchangeRate>> GetExchangeRatesAsync(DateTimeOffset asOn)
+        public async Task<IEnumerable<ExchangeRate>> GetExchangeRatesAsync(DateTimeOffset asOn, CancellationToken cancellationToken)
         {
             var result = new List<ExchangeRate>();

             var ratesList = new List<Tuple<CurrencyInfo, DateTimeOffset, decimal>>();

-            var rawData = await FetchRawDataAsync(RestURL);
+            var rawData = await FetchRawDataAsync(RestURL, cancellationToken);

             var asOnDate = GetRatesDate(asOn);
             foreach (var rawItem in rawData)
@@ -77,9 +78,9 @@
             return result;
         }

-        public async Task<IEnumerable<CurrencyPair>> GetCurrencyPairsAsync(DateTimeOffset asOn)
-        {
-            await FetchOnDemandAsync();
+        public async Task<IEnumerable<CurrencyPair>> GetCurrencyPairsAsync(DateTimeOffset asOn, CancellationToken cancellationToken)
+        {
+            await FetchOnDemandAsync(cancellationToken);

             if (asOn > DateTime.Now)
                 throw new ArgumentException("Exchange rate forecasting are not supported.");
@@ -95,9 +96,9 @@
             return result;
         }

-        public async Task<decimal> GetExchangeRateAsync(CurrencyPair pair, DateTimeOffset asOn)
-        {
-            await FetchOnDemandAsync();
+        public async Task<decimal> GetExchangeRateAsync(CurrencyPair pair, DateTimeOffset asOn, CancellationToken cancellationToken)
+        {
+            await FetchOnDemandAsync(cancellationToken);

             if (asOn > DateTimeOffset.Now)
                 throw new ArgumentException("Exchange rate forecasting not supported.");
@@ -112,15 +113,15 @@
             }
         }

-        private async Task FetchOnDemandAsync()
+        private async Task FetchOnDemandAsync(CancellationToken cancellationToken)
         {
             if (DateTimeOffset.Now - lastFetchDate > TimeSpan.FromDays(1d))
             {
-                await GetExchangeRatesAsync(DateTimeOffset.Now);
-            }
-        }
-
-        private async Task<List<Tuple<string, DateTimeOffset, decimal>>> FetchRawDataAsync(string restUrl)
+                await GetExchangeRatesAsync(DateTimeOffset.Now, cancellationToken);
+            }
+        }
+
+        private async Task<List<Tuple<string, DateTimeOffset, decimal>>> FetchRawDataAsync(string restUrl, CancellationToken cancellationToken)
         {
             using (var httpClient = new HttpClient())
             {


--- TableDependency.OracleClient/Properties/AssemblyInfo.cs
+++ TableDependency.OracleClient/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.6.0.0")]
-[assembly: AssemblyFileVersion("4.6.0.0")]+[assembly: AssemblyVersion("4.5.2.0")]
+[assembly: AssemblyFileVersion("4.5.2.0")]


[FIX] Tests were missing database path.

[FIX] Tests were missing database path.

--- Tests/CK.Glouton.Tests.NetFramework/AlertHandlerTest.cs
+++ Tests/CK.Glouton.Tests.NetFramework/AlertHandlerTest.cs
@@ -1,14 +1,15 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using CK.Core;
+using CK.Core;
 using CK.Glouton.AlertSender.Sender;
+using CK.Glouton.Common;
 using CK.Glouton.Model.Server.Handlers;
 using CK.Glouton.Model.Server.Sender;
 using CK.Glouton.Server;
 using CK.Glouton.Server.Handlers;
 using FluentAssertions;
 using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Threading;

 namespace CK.Glouton.Tests
 {
@@ -29,7 +30,13 @@
                 using( var server = TestHelper.DefaultMockServer() )
                 {
                     server.Should().NotBeNull();
-                    server.Open( new HandlersManagerConfiguration { GloutonHandlers = { new AlertHandlerConfiguration() } } );
+                    server.Open( new HandlersManagerConfiguration
+                    {
+                        GloutonHandlers =
+                        {
+                            new AlertHandlerConfiguration { DatabasePath = @"%localappdata%/Glouton/Alerts".GetPathWithSpecialFolders() }
+                        }
+                    } );
                 }
             };

@@ -45,19 +52,22 @@
                 {
                     GloutonHandlers =
                     {
-                        new AlertHandlerConfiguration { Alerts = new List<IAlertExpressionModel>
-                        {
-                            new AlertExpressionModelMock
-                            (
-                                new [] { new [] { "LogLevel", "In", "Fatal" } },
-                                new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
-                            ),
-                            new AlertExpressionModelMock
-                            (
-                                new [] { new [] { "Text", "Contains", "Send" } },
-                                new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
-                            )
-                        } }
+                        new AlertHandlerConfiguration {
+                            DatabasePath = @"%localappdata%/Glouton/Alerts".GetPathWithSpecialFolders(),
+                            Alerts = new List<IAlertExpressionModel>
+                            {
+                                new AlertExpressionModelMock
+                                (
+                                    new [] { new [] { "LogLevel", "In", "Fatal" } },
+                                    new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
+                                ),
+                                new AlertExpressionModelMock
+                                (
+                                    new [] { new [] { "Text", "Contains", "Send" } },
+                                    new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
+                                )
+                            }
+                        }
                     }
                 } );

@@ -83,7 +93,13 @@
         {
             using( var server = TestHelper.DefaultGloutonServer() )
             {
-                server.Open( new HandlersManagerConfiguration { GloutonHandlers = { new AlertHandlerConfiguration() } } );
+                server.Open( new HandlersManagerConfiguration
+                {
+                    GloutonHandlers =
+                    {
+                        new AlertHandlerConfiguration { DatabasePath = @"%localappdata%/Glouton/Alerts".GetPathWithSpecialFolders() }
+                    }
+                } );

                 using( var httpServer = new HttpServerReceiver( HttpServerReceiver.DefaultUrl ) )
                 using( var grandOutputClient = GrandOutputHelper.GetNewGrandOutputClient() )
@@ -99,14 +115,17 @@
                     {
                         GloutonHandlers =
                         {
-                            new AlertHandlerConfiguration { Alerts = new List<IAlertExpressionModel>
-                            {
-                                new AlertExpressionModelMock
-                                (
-                                    new [] { new [] { "Text", "EqualTo", "Hello world" } },
-                                    new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
-                                )
-                            } }
+                            new AlertHandlerConfiguration {
+                                DatabasePath = @"%localappdata%/Glouton/Alerts".GetPathWithSpecialFolders(),
+                                Alerts = new List<IAlertExpressionModel>
+                                {
+                                    new AlertExpressionModelMock
+                                    (
+                                        new [] { new [] { "Text", "EqualTo", "Hello world" } },
+                                        new IAlertSenderConfiguration[] { new HttpSenderConfiguration { Url = HttpServerReceiver.DefaultUrl } }
+                                    )
+                                }
+                            }
                         }
                     } );
                     Thread.Sleep( TestHelper.DefaultSleepTime );


Resolve #86 - Add registration for usage of the Stage

--- Tests/CSF.Screenplay.SpecFlow.Tests/ScreenplayConfig.cs
+++ Tests/CSF.Screenplay.SpecFlow.Tests/ScreenplayConfig.cs
@@ -11,6 +11,7 @@
     public void Configure(IIntegrationConfigBuilder builder)
     {
       builder.UseCast();
+      builder.UseStage();
       builder.UseReporting(config => {
         config
           .SubscribeToActorsCreatedInCast()


fixed typo in PatternGenerator docs

fixed typo in PatternGenerator docs

--- Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs
+++ Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs
@@ -13,8 +13,8 @@
 //   </list>
 //   The character patterns can refer to these character classes: <para />
 //   <list type="bullet">
-//   <item><description>a: lower-case ascii character, range is 'a' to 'a'</description></item>
-//   <item><description>A: upper-case ascii character, range is 'a' to 'a'</description></item>
+//   <item><description>a: lower-case ASCII character, range is 'a' to 'z'</description></item>
+//   <item><description>A: upper-case ASCII character, range is 'A' to 'Z'</description></item>
 //   <item><description>N: numbers from '0' to '9'</description></item>
 //   <item><description>X: hexadecimal digit from '0' to 'F'</description></item>
 //   </list>
@@ -47,8 +47,8 @@
     /// </list>
     /// The character patterns can refer to these character classes: <para/>
     /// <list type="bullet">
-    /// <item><description>a: lower-case ascii character, range is 'a' to 'a'</description></item>
-    /// <item><description>A: upper-case ascii character, range is 'a' to 'a'</description></item>
+    /// <item><description>a: lower-case ASCII character, range is 'a' to 'z'</description></item>
+    /// <item><description>A: upper-case ASCII character, range is 'A' to 'Z'</description></item>
     /// <item><description>N: numbers from '0' to '9'</description></item>
     /// <item><description>X: hexadecimal digit from '0' to 'F'</description></item>
     /// </list>


Add unit test

Add unit test


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -2939,6 +2939,15 @@
     public void TestMethod_IsPrime_2017()
     {
       const int source = 2017;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_2027()
+    {
+      const int source = 2027;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -1,757 +1,766 @@
-using System.Collections.Generic;
-using FonctionsUtiles.Fred.Csharp;
+using FonctionsUtiles.Fred.Csharp;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Collections.Generic;

 namespace UnitTestUsefullFunctions
 {
-  [TestClass]
-  public class UnitTestFunctionsMathPrimes
-  {
-    #region Math Methods
-    #region IsPrime
-    [TestMethod]
-    public void TestMethod_IsPrime_0()
+    [TestClass]
+    public class UnitTestFunctionsMathPrimes
     {
-      const int source = 0;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_1()
-    {
-      const int source = 1;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_2()
-    {
-      const int source = 2;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_3()
-    {
-      const int source = 3;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_4()
-    {
-      const int source = 4;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_5()
-    {
-      const int source = 5;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_6()
-    {
-      const int source = 6;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_7()
-    {
-      const int source = 7;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_8()
-    {
-      const int source = 8;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_9()
-    {
-      const int source = 9;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_10()
-    {
-      const int source = 10;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_11()
-    {
-      const int source = 11;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_12()
-    {
-      const int source = 12;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_13()
-    {
-      const int source = 13;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_14()
-    {
-      const int source = 14;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_15()
-    {
-      const int source = 15;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_16()
-    {
-      const int source = 16;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_17()
-    {
-      const int source = 17;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_18()
-    {
-      const int source = 18;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_19()
-    {
-      const int source = 19;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_20()
-    {
-      const int source = 20;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_21()
-    {
-      const int source = 21;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_22()
-    {
-      const int source = 22;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_23()
-    {
-      const int source = 23;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_24()
-    {
-      const int source = 24;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_25()
-    {
-      const int source = 25;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_26()
-    {
-      const int source = 26;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_27()
-    {
-      const int source = 27;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_28()
-    {
-      const int source = 28;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_29()
-    {
-      const int source = 29;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_30()
-    {
-      const int source = 30;
-      const bool expected = false;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_31()
-    {
-      const int source = 31;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_37()
-    {
-      const int source = 37;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_41()
-    {
-      const int source = 41;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_43()
-    {
-      const int source = 43;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_47()
-    {
-      const int source = 47;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_53()
-    {
-      const int source = 53;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_59()
-    {
-      const int source = 59;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_61()
-    {
-      const int source = 61;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_67()
-    {
-      const int source = 67;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_71()
-    {
-      const int source = 71;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_73()
-    {
-      const int source = 73;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_79()
-    {
-      const int source = 79;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_83()
-    {
-      const int source = 83;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_89()
-    {
-      const int source = 89;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_97()
-    {
-      const int source = 97;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_101()
-    {
-      const int source = 101;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_103()
-    {
-      const int source = 103;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_107()
-    {
-      const int source = 107;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_109()
-    {
-      const int source = 109;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_113()
-    {
-      const int source = 113;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_127()
-    {
-      const int source = 127;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_131()
-    {
-      const int source = 131;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_137()
-    {
-      const int source = 137;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_139()
-    {
-      const int source = 139;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_149()
-    {
-      const int source = 149;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_151()
-    {
-      const int source = 151;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_157()
-    {
-      const int source = 157;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_163()
-    {
-      const int source = 163;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_167()
-    {
-      const int source = 167;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_173()
-    {
-      const int source = 173;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_179()
-    {
-      const int source = 179;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_181()
-    {
-      const int source = 181;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_191()
-    {
-      const int source = 191;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_193()
-    {
-      const int source = 193;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_197()
-    {
-      const int source = 197;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_199()
-    {
-      const int source = 199;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_211()
-    {
-      const int source = 211;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_223()
-    {
-      const int source = 223;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_227()
-    {
-      const int source = 227;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_229()
-    {
-      const int source = 229;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_233()
-    {
-      const int source = 233;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_239()
-    {
-      const int source = 239;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_241()
-    {
-      const int source = 241;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_IsPrime_251()
-    {
-      const int source = 251;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    /*  Add unit test
-    De 101 à 200:
-    101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
-    De 201 à 300:
-    211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
-    De 301 à 400:
-    307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397
-    De 401 à 500:
-    401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
-    De 501 à 600:
-    503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599
-    De 601 à 700:
-    601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691
-    De 701 à 800:
-    701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797
-    De 801 à 900:
-    809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887
-    De 901 à 1000:
-    907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
-    */
-
-    [TestMethod]
-    public void TestMethod_IsPrime_Int_MaxValue()
-    {
-      const int source = 2147483647;
-      const bool expected = true;
-      bool result = FunctionsMath.IsPrime(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    #endregion
-    #region GetListOfPrime
-    [TestMethod]
-    public void TestMethod_GetListOfPrime_4_numbers()
-    {
-      const int source1 = 2;
-      const int source2 = 10;
-      var expected = new List<int> { 2, 3, 5, 7 };
-      List<int> result = FunctionsMath.GetListOfPrime(source1, source2 - source1);
-      AssertListsAreSimilar(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_GetListOfPrime_none()
-    {
-      const int source1 = 32;
-      const int source2 = 5;
-      var expected = new List<int>();
-      List<int> result = FunctionsMath.GetListOfPrime(source1, source2);
-      AssertListsAreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_GetListOfPrime_until_100()
-    {
-      const int source1 = 2;
-      const int source2 = 100;
-      var expected = new List<int> { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 };
-      List<int> result = FunctionsMath.GetListOfPrime(source1, source2 - source1);
-      AssertListsAreSimilar(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_GetListOfPrime_until_7919()
-    {
-      const int source1 = 2;
-      const int source2 = 7919;
-      var expected = new List<int>
+        #region Math Methods
+        #region IsPrime
+        [TestMethod]
+        public void TestMethod_IsPrime_0()
+        {
+            const int source = 0;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_1()
+        {
+            const int source = 1;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_2()
+        {
+            const int source = 2;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_3()
+        {
+            const int source = 3;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_4()
+        {
+            const int source = 4;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_5()
+        {
+            const int source = 5;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_6()
+        {
+            const int source = 6;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_7()
+        {
+            const int source = 7;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_8()
+        {
+            const int source = 8;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_9()
+        {
+            const int source = 9;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_10()
+        {
+            const int source = 10;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_11()
+        {
+            const int source = 11;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_12()
+        {
+            const int source = 12;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_13()
+        {
+            const int source = 13;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_14()
+        {
+            const int source = 14;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_15()
+        {
+            const int source = 15;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_16()
+        {
+            const int source = 16;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_17()
+        {
+            const int source = 17;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_18()
+        {
+            const int source = 18;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_19()
+        {
+            const int source = 19;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_20()
+        {
+            const int source = 20;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_21()
+        {
+            const int source = 21;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_22()
+        {
+            const int source = 22;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_23()
+        {
+            const int source = 23;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_24()
+        {
+            const int source = 24;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_25()
+        {
+            const int source = 25;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_26()
+        {
+            const int source = 26;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_27()
+        {
+            const int source = 27;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_28()
+        {
+            const int source = 28;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_29()
+        {
+            const int source = 29;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_30()
+        {
+            const int source = 30;
+            const bool expected = false;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_31()
+        {
+            const int source = 31;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_37()
+        {
+            const int source = 37;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_41()
+        {
+            const int source = 41;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_43()
+        {
+            const int source = 43;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_47()
+        {
+            const int source = 47;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_53()
+        {
+            const int source = 53;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_59()
+        {
+            const int source = 59;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_61()
+        {
+            const int source = 61;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_67()
+        {
+            const int source = 67;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_71()
+        {
+            const int source = 71;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_73()
+        {
+            const int source = 73;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_79()
+        {
+            const int source = 79;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_83()
+        {
+            const int source = 83;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_89()
+        {
+            const int source = 89;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_97()
+        {
+            const int source = 97;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_101()
+        {
+            const int source = 101;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_103()
+        {
+            const int source = 103;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_107()
+        {
+            const int source = 107;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_109()
+        {
+            const int source = 109;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_113()
+        {
+            const int source = 113;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_127()
+        {
+            const int source = 127;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_131()
+        {
+            const int source = 131;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_137()
+        {
+            const int source = 137;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_139()
+        {
+            const int source = 139;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_149()
+        {
+            const int source = 149;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_151()
+        {
+            const int source = 151;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_157()
+        {
+            const int source = 157;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_163()
+        {
+            const int source = 163;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_167()
+        {
+            const int source = 167;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_173()
+        {
+            const int source = 173;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_179()
+        {
+            const int source = 179;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_181()
+        {
+            const int source = 181;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_191()
+        {
+            const int source = 191;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_193()
+        {
+            const int source = 193;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_197()
+        {
+            const int source = 197;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_199()
+        {
+            const int source = 199;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_211()
+        {
+            const int source = 211;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_223()
+        {
+            const int source = 223;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_227()
+        {
+            const int source = 227;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_229()
+        {
+            const int source = 229;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_233()
+        {
+            const int source = 233;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_239()
+        {
+            const int source = 239;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_241()
+        {
+            const int source = 241;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_251()
+        {
+            const int source = 251;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_IsPrime_257()
+        {
+            const int source = 257;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        /*  Add unit test
+        De 101 à 200:
+        101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199
+        De 201 à 300:
+        211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
+        De 301 à 400:
+        307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397
+        De 401 à 500:
+        401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
+        De 501 à 600:
+        503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599
+        De 601 à 700:
+        601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691
+        De 701 à 800:
+        701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797
+        De 801 à 900:
+        809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887
+        De 901 à 1000:
+        907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
+        */
+
+        [TestMethod]
+        public void TestMethod_IsPrime_Int_MaxValue()
+        {
+            const int source = 2147483647;
+            const bool expected = true;
+            bool result = FunctionsMath.IsPrime(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        #endregion
+        #region GetListOfPrime
+        [TestMethod]
+        public void TestMethod_GetListOfPrime_4_numbers()
+        {
+            const int source1 = 2;
+            const int source2 = 10;
+            var expected = new List<int> { 2, 3, 5, 7 };
+            List<int> result = FunctionsMath.GetListOfPrime(source1, source2 - source1);
+            AssertListsAreSimilar(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_GetListOfPrime_none()
+        {
+            const int source1 = 32;
+            const int source2 = 5;
+            var expected = new List<int>();
+            List<int> result = FunctionsMath.GetListOfPrime(source1, source2);
+            AssertListsAreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_GetListOfPrime_until_100()
+        {
+            const int source1 = 2;
+            const int source2 = 100;
+            var expected = new List<int> { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 };
+            List<int> result = FunctionsMath.GetListOfPrime(source1, source2 - source1);
+            AssertListsAreSimilar(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_GetListOfPrime_until_7919()
+        {
+            const int source1 = 2;
+            const int source2 = 7919;
+            var expected = new List<int>
       {
         2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,
         101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193,
@@ -818,413 +827,413 @@
         7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759,
         7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919
       };
-      List<int> result = FunctionsMath.GetListOfPrime(source1, source2);
-      AssertListsAreSimilar(result, expected);
+            List<int> result = FunctionsMath.GetListOfPrime(source1, source2);
+            AssertListsAreSimilar(result, expected);
+        }
+
+        private static void AssertListsAreEqual(IReadOnlyList<int> result, IReadOnlyList<int> expected)
+        {
+            Assert.AreEqual(result.Count, expected.Count);
+            for (int i = 0; i < result.Count; i++)
+            {
+                Assert.AreEqual(result[i], expected[i]);
+            }
+        }
+
+        private static void AssertListsAreSimilar(IReadOnlyCollection<int> result, ICollection<int> expected)
+        {
+            // similar because of a Parallel loop
+            Assert.AreEqual(result.Count, expected.Count);
+            foreach (int item in result)
+            {
+                Assert.IsTrue(expected.Contains(item));
+            }
+        }
+
+        #endregion
+        #region PrimeByFormula
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_0()
+        {
+            const ushort source = 0;
+            const int expected = 41;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_1()
+        {
+            const ushort source = 1;
+            const int expected = 41;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_2()
+        {
+            const ushort source = 2;
+            const int expected = 43;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_3()
+        {
+            const ushort source = 3;
+            const int expected = 47;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_4()
+        {
+            const ushort source = 4;
+            const int expected = 53;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_5()
+        {
+            const ushort source = 5;
+            const int expected = 61;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_6()
+        {
+            const ushort source = 6;
+            const int expected = 71;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_7()
+        {
+            const ushort source = 7;
+            const int expected = 83;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_8()
+        {
+            const ushort source = 8;
+            const int expected = 97;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_9()
+        {
+            const ushort source = 9;
+            const int expected = 113;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_10()
+        {
+            const ushort source = 10;
+            const int expected = 131;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_11()
+        {
+            const ushort source = 11;
+            const int expected = 151;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_12()
+        {
+            const ushort source = 12;
+            const int expected = 173;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_13()
+        {
+            const ushort source = 13;
+            const int expected = 197;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_14()
+        {
+            const ushort source = 14;
+            const int expected = 223;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_15()
+        {
+            const ushort source = 15;
+            const int expected = 251;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_16()
+        {
+            const ushort source = 16;
+            const int expected = 281;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_17()
+        {
+            const ushort source = 17;
+            const int expected = 313;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_18()
+        {
+            const ushort source = 18;
+            const int expected = 347;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_19()
+        {
+            const ushort source = 19;
+            const int expected = 383;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_20()
+        {
+            const ushort source = 20;
+            const int expected = 421;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_21()
+        {
+            const ushort source = 21;
+            const int expected = 461;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_22()
+        {
+            const ushort source = 22;
+            const int expected = 503;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_23()
+        {
+            const ushort source = 23;
+            const int expected = 547;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_24()
+        {
+            const ushort source = 24;
+            const int expected = 593;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_25()
+        {
+            const ushort source = 25;
+            const int expected = 641;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_26()
+        {
+            const ushort source = 26;
+            const int expected = 691;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_27()
+        {
+            const ushort source = 27;
+            const int expected = 743;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_28()
+        {
+            const ushort source = 28;
+            const int expected = 797;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_29()
+        {
+            const ushort source = 29;
+            const int expected = 853;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_30()
+        {
+            const ushort source = 30;
+            const int expected = 911;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_31()
+        {
+            const ushort source = 31;
+            const int expected = 971;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_32()
+        {
+            const ushort source = 32;
+            const int expected = 1033;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_33()
+        {
+            const ushort source = 33;
+            const int expected = 1097;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_34()
+        {
+            const ushort source = 34;
+            const int expected = 1163;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_35()
+        {
+            const ushort source = 35;
+            const int expected = 1231;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_36()
+        {
+            const ushort source = 36;
+            const int expected = 1301;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_37()
+        {
+            const ushort source = 37;
+            const int expected = 1373;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_38()
+        {
+            const ushort source = 38;
+            const int expected = 1447;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_39()
+        {
+            const ushort source = 39;
+            const int expected = 1523;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        [TestMethod]
+        public void TestMethod_PrimeByFormula_value_40()
+        {
+            const ushort source = 40;
+            const int expected = 1601;
+            int result = FunctionsMath.PrimeByFormula(source);
+            Assert.AreEqual(result, expected);
+        }
+
+        #endregion PrimeByFormula
+        #endregion Math Methods
+
+        #region Unit Test Helper methods
+        public static void AssertAreEqualList(List<int> result, List<int> expected)
+        {
+            Assert.AreEqual(result.Count, expected.Count);
+            for (int i = 0; i < expected.Count; i++)
+            {
+                Assert.AreEqual(result[i], expected[i]);
+            }
+        }
+        #endregion Unit Test Helper methods
+
     }
-
-    private static void AssertListsAreEqual(IReadOnlyList<int> result, IReadOnlyList<int> expected)
-    {
-      Assert.AreEqual(result.Count, expected.Count);
-      for (int i = 0; i < result.Count; i++)
-      {
-        Assert.AreEqual(result[i], expected[i]);
-      }
-    }
-
-    private static void AssertListsAreSimilar(IReadOnlyCollection<int> result, ICollection<int> expected)
-    {
-      // similar because of a Parallel loop
-      Assert.AreEqual(result.Count, expected.Count);
-      foreach (int item in result)
-      {
-        Assert.IsTrue(expected.Contains(item));
-      }
-    }
-
-    #endregion
-    #region PrimeByFormula
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_0()
-    {
-      const ushort source = 0;
-      const int expected = 41;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_1()
-    {
-      const ushort source = 1;
-      const int expected = 41;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_2()
-    {
-      const ushort source = 2;
-      const int expected = 43;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_3()
-    {
-      const ushort source = 3;
-      const int expected = 47;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_4()
-    {
-      const ushort source = 4;
-      const int expected = 53;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_5()
-    {
-      const ushort source = 5;
-      const int expected = 61;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_6()
-    {
-      const ushort source = 6;
-      const int expected = 71;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_7()
-    {
-      const ushort source = 7;
-      const int expected = 83;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_8()
-    {
-      const ushort source = 8;
-      const int expected = 97;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_9()
-    {
-      const ushort source = 9;
-      const int expected = 113;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_10()
-    {
-      const ushort source = 10;
-      const int expected = 131;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_11()
-    {
-      const ushort source = 11;
-      const int expected = 151;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_12()
-    {
-      const ushort source = 12;
-      const int expected = 173;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_13()
-    {
-      const ushort source = 13;
-      const int expected = 197;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_14()
-    {
-      const ushort source = 14;
-      const int expected = 223;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_15()
-    {
-      const ushort source = 15;
-      const int expected = 251;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_16()
-    {
-      const ushort source = 16;
-      const int expected = 281;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_17()
-    {
-      const ushort source = 17;
-      const int expected = 313;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_18()
-    {
-      const ushort source = 18;
-      const int expected = 347;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_19()
-    {
-      const ushort source = 19;
-      const int expected = 383;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_20()
-    {
-      const ushort source = 20;
-      const int expected = 421;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_21()
-    {
-      const ushort source = 21;
-      const int expected = 461;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_22()
-    {
-      const ushort source = 22;
-      const int expected = 503;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_23()
-    {
-      const ushort source = 23;
-      const int expected = 547;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_24()
-    {
-      const ushort source = 24;
-      const int expected = 593;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_25()
-    {
-      const ushort source = 25;
-      const int expected = 641;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_26()
-    {
-      const ushort source = 26;
-      const int expected = 691;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_27()
-    {
-      const ushort source = 27;
-      const int expected = 743;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_28()
-    {
-      const ushort source = 28;
-      const int expected = 797;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_29()
-    {
-      const ushort source = 29;
-      const int expected = 853;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_30()
-    {
-      const ushort source = 30;
-      const int expected = 911;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_31()
-    {
-      const ushort source = 31;
-      const int expected = 971;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_32()
-    {
-      const ushort source = 32;
-      const int expected = 1033;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_33()
-    {
-      const ushort source = 33;
-      const int expected = 1097;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_34()
-    {
-      const ushort source = 34;
-      const int expected = 1163;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_35()
-    {
-      const ushort source = 35;
-      const int expected = 1231;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_36()
-    {
-      const ushort source = 36;
-      const int expected = 1301;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_37()
-    {
-      const ushort source = 37;
-      const int expected = 1373;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_38()
-    {
-      const ushort source = 38;
-      const int expected = 1447;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_39()
-    {
-      const ushort source = 39;
-      const int expected = 1523;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    [TestMethod]
-    public void TestMethod_PrimeByFormula_value_40()
-    {
-      const ushort source = 40;
-      const int expected = 1601;
-      int result = FunctionsMath.PrimeByFormula(source);
-      Assert.AreEqual(result, expected);
-    }
-
-    #endregion PrimeByFormula
-    #endregion Math Methods
-
-    #region Unit Test Helper methods
-    public static void AssertAreEqualList(List<int> result, List<int> expected)
-    {
-      Assert.AreEqual(result.Count, expected.Count);
-      for (int i = 0; i < expected.Count; i++)
-      {
-        Assert.AreEqual(result[i], expected[i]);
-      }
-    }
-    #endregion Unit Test Helper methods
-
-  }
 }


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -787,6 +787,15 @@
     public void TestMethod_IsPrime_317()
     {
       const int source = 317;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_331()
+    {
+      const int source = 331;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMathPrimes.cs
@@ -1291,6 +1291,15 @@
     public void TestMethod_IsPrime_673()
     {
       const int source = 673;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_677()
+    {
+      const int source = 677;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


Remove some unneeded debug spew.

Remove some unneeded debug spew.

--- server/Mango.Server/HttpConnection.cs
+++ server/Mango.Server/HttpConnection.cs
@@ -85,11 +85,6 @@

 		private void OnHeaders (IOStream stream, byte [] data)
 		{
-			Console.WriteLine ("HEADERS:");
-			Console.WriteLine ("=========");
-			Console.WriteLine (Encoding.ASCII.GetString (data));
-			Console.WriteLine ("=========");
-
 			string h = Encoding.ASCII.GetString (data);
 			StringReader reader = new StringReader (h);

@@ -127,7 +122,6 @@
 			s = e + 1;
 			version = line.Substring (s);

-			Console.WriteLine ("VERB: '{0}'  PATH:  '{1}'   VERSION:  '{2}'", verb, path, version);
 			if (!version.StartsWith ("HTTP/"))
 				throw new Exception ("Malformed HTTP request, no version specified.");
 		}


Code style tweaks - I'm no C# guru, but removing unnecessary `this.` seems like a good idea

--- VirtualDesktopGridSwitcher/VirtualDesktopGridManager.cs
+++ VirtualDesktopGridSwitcher/VirtualDesktopGridManager.cs
@@ -52,14 +52,14 @@
             this.settings = settings;
             this.sysTrayProcess = sysTrayProcess;

-            this.VDMHelper = VdmHelperFactory.CreateInstance();
-            this.VDMHelper.Init();
+            VDMHelper = VdmHelperFactory.CreateInstance();
+            VDMHelper.Init();

             foregroundWindowChangedDelegate = new WinAPI.WinEventDelegate(ForegroundWindowChanged);
             fgWindowHook = WinAPI.SetWinEventHook(WinAPI.EVENT_SYSTEM_FOREGROUND, WinAPI.EVENT_SYSTEM_FOREGROUND, IntPtr.Zero, foregroundWindowChangedDelegate, 0, 0, WinAPI.WINEVENT_OUTOFCONTEXT);

             // Create a custom message ID for other processes to trigger actions.
-            this.commandWindowMessage = RegisterWindowMessage("VIRTUALDESKTOPGRIDSWITCHER_COMMAND");
+            commandWindowMessage = RegisterWindowMessage("VIRTUALDESKTOPGRIDSWITCHER_COMMAND");
             Application.AddMessageFilter(this);

             Start();
@@ -69,7 +69,7 @@
         {
             Stop();

-            this.VDMHelper.Dispose();
+            VDMHelper.Dispose();

             WinAPI.UnhookWinEvent(fgWindowHook);
         }
@@ -93,7 +93,7 @@
                 int index = 0;
                 desktops.ToList().ForEach(d => desktopIdLookup.Add(d, index++));

-                this._current = desktopIdLookup[VirtualDesktop.Current];
+                _current = desktopIdLookup[VirtualDesktop.Current];

                 activeWindows = new IntPtr[desktops.Length];
                 lastActiveBrowserWindows = new IntPtr[desktops.Length];
@@ -145,7 +145,7 @@
                 var newDesktop = desktopIdLookup[VirtualDesktop.Current];
                 Debug.WriteLine("Switched to " + newDesktop);

-                this._current = newDesktop;
+                _current = newDesktop;
                 sysTrayProcess.ShowIconForDesktop(Current);

                 var fgHwnd = WinAPI.GetForegroundWindow();
@@ -249,7 +249,7 @@
         private bool ActivateWindow(IntPtr hwnd) {
             if (hwnd != IntPtr.Zero) {
                 var desktop = VirtualDesktop.FromHwnd(hwnd);
-                if (desktop != null && desktopIdLookup[desktop] == this._current) {
+                if (desktop != null && desktopIdLookup[desktop] == _current) {
                     Debug.WriteLine("Activate " + Current + " " + hwnd);
                     WinAPI.SetForegroundWindow(hwnd);
                     return true;
@@ -495,7 +495,7 @@

                 Debug.WriteLine("Move " + hwnd + " from " + Current + " to " + index);
                 if (!VirtualDesktopHelper.MoveToDesktop(hwnd, desktops[index])) {
-                    this.VDMHelper.MoveWindowToDesktop(hwnd, desktops[index].Id);
+                    VDMHelper.MoveWindowToDesktop(hwnd, desktops[index].Id);
                 }
             }
         }
@@ -528,10 +528,10 @@

             hotkeys = new List<Hotkey>();

-            RegisterSwitchHotkey(Keys.Left, delegate { this.Switch(Left); });
-            RegisterSwitchHotkey(Keys.Right, delegate { this.Switch(Right); });
-            RegisterSwitchHotkey(Keys.Up, delegate { this.Switch(Up); });
-            RegisterSwitchHotkey(Keys.Down, delegate { this.Switch(Down); });
+            RegisterSwitchHotkey(Keys.Left, delegate { Switch(Left); });
+            RegisterSwitchHotkey(Keys.Right, delegate { Switch(Right); });
+            RegisterSwitchHotkey(Keys.Up, delegate { Switch(Up); });
+            RegisterSwitchHotkey(Keys.Down, delegate { Switch(Down); });

             RegisterMoveHotkey(Keys.Left, delegate { Move(Left); });
             RegisterMoveHotkey(Keys.Right, delegate { Move(Right); });
@@ -543,9 +543,9 @@
                 Keys keycode =
                     (Keys)Enum.Parse(typeof(Keys), (settings.FKeysForNumbers ? "F" : "D") + keyNumber.ToString());

-                RegisterSwitchHotkey(keycode, delegate { this.Switch(desktopIndex); });
-
-                RegisterMoveHotkey(keycode, delegate { this.Move(desktopIndex); });
+                RegisterSwitchHotkey(keycode, delegate { Switch(desktopIndex); });
+
+                RegisterMoveHotkey(keycode, delegate { Move(desktopIndex); });
             }

             RegisterToggleStickyHotKey();
@@ -679,7 +679,7 @@
         public bool PreFilterMessage(ref Message message)
         {
             // Ignore unknown messages
-            if (message.Msg != this.commandWindowMessage)
+            if (message.Msg != commandWindowMessage)
             { return false; }

             int command = message.WParam.ToInt32();


Remove unnecessary comment

Remove unnecessary comment

--- WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
+++ WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
@@ -17,7 +17,6 @@

 			ConfirmSetting = new Interaction<string, bool>();

-			// NOTE: In ReactiveUI docs this is registered in view ctor.
 			ConfirmSetting.RegisterHandler(
 				async interaction =>
 				{


updated naming

updated naming

--- Web/ApplicationApi/Controllers/DeviceAdminController.cs
+++ Web/ApplicationApi/Controllers/DeviceAdminController.cs
@@ -13,18 +13,18 @@
     [RoutePrefix("api/DeviceAdmin")]
     public class DeviceAdminController : ApiController
     {
-        IDeviceRegistration RegistrationService = null;
+        IDeviceRegistration registrationService = null;

-        public DeviceAdminController(IDeviceRegistration messagingService)
+        public DeviceAdminController(IDeviceRegistration registrationService)
         {
-            this.RegistrationService = messagingService;
+            this.registrationService = registrationService;
         }

         [HttpPost]
         [Route("RegisterDevice")]
         public async Task<IHttpActionResult> RegisterDevice([FromBody]IDevice device)
         {
-            var result = await RegistrationService.RegisterDeviceAsync(device);
+            var result = await registrationService.RegisterDeviceAsync(device);
             if (result.DidFail())
                 return BadRequest(result.GetFriendlyError());
             return Ok(result.GetResult());
@@ -34,7 +34,7 @@
         [Route("UnregisterDevice")]
         public async Task<IHttpActionResult> UnregisterDevice([FromBody]IDevice device)
         {
-            var result = await RegistrationService.UnregisterDeviceAsync(device);
+            var result = await registrationService.UnregisterDeviceAsync(device);
             if (result.DidFail())
                 return BadRequest(result.GetFriendlyError());
             return Ok(result.GetResult());


Refactor

Refactor

--- WelderCalculator/WelderCalculator/Model/BaseMaterial.cs
+++ WelderCalculator/WelderCalculator/Model/BaseMaterial.cs
@@ -17,15 +17,15 @@
             Elements.Add(new Element(Category.OfElement.Mn));
             Elements.Add(new Element(Category.OfElement.P));
             Elements.Add(new Element(Category.OfElement.S));
+            Elements.Add(new Element(Category.OfElement.Cr));
+            Elements.Add(new Element(Category.OfElement.Ni));
+            Elements.Add(new Element(Category.OfElement.Mo));
             Elements.Add(new Element(Category.OfElement.N));
-            Elements.Add(new Element(Category.OfElement.Cr));
-            Elements.Add(new Element(Category.OfElement.Mo));
+            Elements.Add(new Element(Category.OfElement.Cu));
             Elements.Add(new Element(Category.OfElement.Nb));
-            Elements.Add(new Element(Category.OfElement.Ni));
             Elements.Add(new Element(Category.OfElement.Ti));
+            Elements.Add(new Element(Category.OfElement.V));
             Elements.Add(new Element(Category.OfElement.Al));
-            Elements.Add(new Element(Category.OfElement.V));
-            Elements.Add(new Element(Category.OfElement.Cu));
         }

         public override bool Equals(Material material)


Client side PIIToken validation added.

Client side PIIToken validation added.

--- XOMNI.SDK/XOMNI.SDK.Public/Clients/PII/LoyaltyClient.cs
+++ XOMNI.SDK/XOMNI.SDK.Public/Clients/PII/LoyaltyClient.cs
@@ -17,6 +17,8 @@

         public async Task<ApiResponse<LoyaltyUser>> GetAsync()
 		{
+            ValidatePIIToken();
+
 			string path = "/pii/loyalty";

 			using (var response = await Client.GetAsync(path).ConfigureAwait(false))


4th test for #347 without nullable

4th test for #347 without nullable

--- test/FastExpressionCompiler.IssueTests/Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs
+++ test/FastExpressionCompiler.IssueTests/Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs
@@ -21,10 +21,41 @@
     {
         public int Run()
         {
-            Test_nullable_param_in_closure_of_the_nested_lambda();
+            Test_struct_parameter_in_closure_of_the_nested_lambda();
+            // Test_nullable_param_in_closure_of_the_nested_lambda();
             // Test_nullable_of_struct_and_struct_field_in_the_nested_lambda();
             // Test_original();
-            return 3;
+            return 4;
+        }
+
+        [Test]
+        public void Test_struct_parameter_in_closure_of_the_nested_lambda()
+        {
+            var incMethod = GetType().GetMethod(nameof(Inc), BindingFlags.Public | BindingFlags.Static);
+            var propValue = typeof(NotifyModel).GetProperty(nameof(NotifyModel.Number1));
+
+            var p = Parameter(typeof(NotifyModel), "m");
+            var expr = Lambda<Func<NotifyModel, int>>(
+                Call(incMethod, Lambda<Func<int>>(Property(p, propValue))),
+                p
+            );
+
+            expr.PrintCSharp();
+
+            var fs = expr.CompileSys();
+            fs.PrintIL();
+
+            var m = new NotifyModel(42, -1);
+
+            var x = fs(m);
+            Assert.AreEqual(43, x);
+
+            var f = expr.CompileFast(true, CompilerFlags.EnableDelegateDebugInfo);
+            Assert.IsNotNull(f);
+            f.PrintIL();
+
+            var y = f(m);
+            Assert.AreEqual(43, y);
         }

         [Test]