diff --git a/exercise/c#/AdventOfCraft.sln b/exercise/c#/AdventOfCraft.sln new file mode 100644 index 00000000..ef6d991e --- /dev/null +++ b/exercise/c#/AdventOfCraft.sln @@ -0,0 +1,396 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 1 - Make your production code easier to understand", "Day 1 - Make your production code easier to understand", "{1B18AD70-29A4-4D6F-A9CC-90062090D789}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day01.Tests", "Day01\Day01.Tests\Day01.Tests.csproj", "{E4531F97-7BA3-4EBC-83C9-2D8C692C02CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day01", "Day01\Day01\Day01.csproj", "{E590BBEB-7AB4-402A-8401-2A1C0F527501}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 2 - One level of indentation", "Day 2 - One level of indentation", "{6D089E60-B349-468E-BC1D-3DC4DC7D6C51}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day02.Tests", "Day02\Day02.Tests\Day02.Tests.csproj", "{F812DB10-5139-4153-8EBD-65E6D9620045}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day02", "Day02\Day02\Day02.csproj", "{67696132-26E4-4883-87BF-60D5705E61D4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 3 - One dot per line", "Day 3 - One dot per line", "{D17C0749-D555-465F-A07A-826AE7BD025E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day03", "Day03\Day03\Day03.csproj", "{42078835-3737-4A25-9593-ED589BF80C54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day03.Tests", "Day03\Day03.Tests\Day03.Tests.csproj", "{C0386FEA-4627-4958-BCA8-62556E25859D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 4 - Identify the behavior under test and rewrite the tests", "Day 4 - Identify the behavior under test and rewrite the tests", "{10BCF13E-C7CA-4A89-86CD-0E8047139AA8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day04", "Day04\Day04\Day04.csproj", "{C9D0BF2C-224C-4030-90DD-4ECA2D1D3833}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day04.Tests", "Day04\Day04.Tests\Day04.Tests.csproj", "{6E908535-E191-4228-8A9C-E7A06DFD2E11}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 5 - No for loop authorized", "Day 5 - No for loop authorized", "{35D192B7-F9F6-41BB-8163-7595E3ADE21B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day05", "Day05\Day05\Day05.csproj", "{2E6FC488-AF67-4A84-83D5-48BB15164C28}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day05.Tests", "Day05\Day05.Tests\Day05.Tests.csproj", "{B6C9C42F-B182-44D0-A598-9E36F80D2959}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 6 - Parameterize your tests", "Day 6 - Parameterize your tests", "{B4B695B1-9429-4137-8211-691FE187A916}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day06", "Day06\Day06\Day06.csproj", "{71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day06.Tests", "Day06\Day06.Tests\Day06.Tests.csproj", "{5AED5510-8489-4E06-9546-03F904741BE4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 7 - Simplify the run method by extracting the right behavior", "Day 7 - Simplify the run method by extracting the right behavior", "{23CC6A12-0FD6-429F-AE41-7F74C443B0AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day07", "Day07\Day07\Day07.csproj", "{E273A593-626C-4EC4-9708-50A733008690}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day07.Tests", "Day07\Day07.Tests\Day07.Tests.csproj", "{1F07D5D3-6FCE-4D9D-9054-E12DF63A452A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 8 - Using TDD rules write a password validation program", "Day 8 - Using TDD rules write a password validation program", "{8EB0D086-66B2-41DA-9DD0-8B55585E6138}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day08", "Day08\Day08\Day08.csproj", "{0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day08.Tests", "Day08\Day08.Tests\Day08.Tests.csproj", "{3372B6EF-31D1-4782-AD74-A04C6F2CE2A6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 9 - Fix the code", "Day 9 - Fix the code", "{F9C6D3A8-6178-4AD7-888D-9281C7E5CD6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day09", "Day09\Day09\Day09.csproj", "{BC5F2985-2BE0-4652-87DD-F3EEB998768B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day09.Tests", "Day09\Day09.Tests\Day09.Tests.csproj", "{37EFA90F-E88A-41E3-BD14-F1E94972CF86}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 10 - Dot not use if statement", "Day 10 - Dot not use if statement", "{BE5956AD-0A92-4390-B15E-123BD6D348E6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day10", "Day10\Day10\Day10.csproj", "{F987F3A5-7585-40D7-8CB7-F3B29D99B998}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day10.Tests", "Day10\Day10.Tests\Day10.Tests.csproj", "{5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 11 - Gather a dependency freshness metric", "Day 11 - Gather a dependency freshness metric", "{5731AE6D-76BF-48D1-9B19-4DF9E56D4BD1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day11", "Day11\Day11\Day11.csproj", "{8F81B45C-9BBF-4B84-8394-CF809539C632}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day11.Tests", "Day11\Day11.Tests\Day11.Tests.csproj", "{6CA9F7F3-9B38-4971-AD52-B7601C4FA808}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 12 - Make your code open for extension", "Day 12 - Make your code open for extension", "{61F6F0AE-8D1E-479E-A878-A0A337EE8E92}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day12", "Day12\Day12\Day12.csproj", "{80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day12.Tests", "Day12\Day12.Tests\Day12.Tests.csproj", "{3F424E11-0027-4C49-8868-D7F6018FED21}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 13 - Find a way to eliminate the irrelevant and amplify the essentials of those tests", "Day 13 - Find a way to eliminate the irrelevant and amplify the essentials of those tests", "{3CFC8F6C-2B2A-4FE5-BC2B-DDF3E2AE0B4C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day13", "Day13\Day13\Day13.csproj", "{A79DF0E5-043A-4848-AE8D-A94D66E34156}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day13.Tests", "Day13\Day13.Tests\Day13.Tests.csproj", "{A3400B5F-F984-41BF-8EA7-D9266E102B0A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 14 - Do not use exceptions anymore", "Day 14 - Do not use exceptions anymore", "{5E022707-C82F-403F-8A3E-659271B12E71}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day14", "Day14\Day14\Day14.csproj", "{80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day14.Tests", "Day14\Day14.Tests\Day14.Tests.csproj", "{65BD9353-3CC9-454D-B915-E9388566184A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 15 - Put a code under tests", "Day 15 - Put a code under tests", "{24662303-5A3F-4356-A8AF-A5E2E866A7E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day15", "Day15\Day15\Day15.csproj", "{36316272-5E4D-4326-BD3E-3AFA5C221C99}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day15.Tests", "Day15\Day15.Tests\Day15.Tests.csproj", "{534D7E0A-9571-42BD-895F-73D9478A7156}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 16 - Make this code immutable", "Day 16 - Make this code immutable", "{8241AC18-B1E7-4396-BE6F-0F514A8FCE12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day16", "Day16\Day16\Day16.csproj", "{999AF80D-A39A-4C38-8E22-52AD308E2DE9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day16.Tests", "Day16\Day16.Tests\Day16.Tests.csproj", "{8607CFE8-70E1-42DE-8B87-246E4F1F947F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 17 - Design one test that has the impact of thousands", "Day 17 - Design one test that has the impact of thousands", "{17352B10-55B2-4E4C-980C-29C1ED192B40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day17", "Day17\Day17\Day17.csproj", "{EF583C28-D8A4-416E-A311-0C570286D686}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day17.Tests", "Day17\Day17.Tests\Day17.Tests.csproj", "{478BFE02-2699-4150-B31F-407C7DDE1BB1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 18 - Automatically detect Linguistic Anti-Patterns", "Day 18 - Automatically detect Linguistic Anti-Patterns", "{1E6BFC0D-0B6A-4419-B55C-E52035225B66}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day18", "Day18\Day18\Day18.csproj", "{98920AED-928E-49AA-AEE3-CA64DB29AEA7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day18.Tests", "Day18\Day18.Tests\Day18.Tests.csproj", "{623BC3DF-0C4E-464F-ADBA-DCA5212C4306}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 19 - Loosing up dead weight", "Day 19 - Loosing up dead weight", "{E96B25E8-46D0-431E-A249-72F093C83372}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day19", "Day19\Day19\Day19.csproj", "{A06B5B1F-1284-4D45-B647-A378830DDF1A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day19.Tests", "Day19\Day19.Tests\Day19.Tests.csproj", "{EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 20 - No more exceptions in our domain", "Day 20 - No more exceptions in our domain", "{E90B121F-C580-4C0E-9958-367EB5EA9706}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day20", "Day20\Day20\Day20.csproj", "{9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day20.Tests", "Day20\Day20.Tests\Day20.Tests.csproj", "{6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 21 - Refactor the tests and production code to Output-Based tests ", "Day 21 - Refactor the tests and production code to Output-Based tests ", "{9644433D-8B7D-4C24-A642-13C500107FBF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day21", "Day21\Day21\Day21.csproj", "{651BEFA9-E0C9-4C27-BC37-D679B2FDD95C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day21.Tests", "Day21\Day21.Tests\Day21.Tests.csproj", "{57F7115A-2E0F-47DE-A0B2-DD043E929B47}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 22 - Design a diamond program using T.D.D and Property-Based Testing", "Day 22 - Design a diamond program using T.D.D and Property-Based Testing", "{470065A1-F961-4E64-8889-52849A9BE2FA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day22", "Day22\Day22\Day22.csproj", "{A11D1D12-A267-4A94-B020-C86D88A8FD12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day22.Tests", "Day22\Day22.Tests\Day22.Tests.csproj", "{090A8693-38AF-4AE4-92CF-5987BB9508AE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 23 - Refactor the code after putting it under test", "Day 23 - Refactor the code after putting it under test", "{E6945681-959A-4F52-B533-15E6130B6193}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day23", "Day23\Day23\Day23.csproj", "{5FB3E705-A670-48F3-95BD-06309D9C145A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day23.Tests", "Day23\Day23.Tests\Day23.Tests.csproj", "{D461192A-11BF-40B6-8BA8-AED8B49C8C68}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Day 24 - Write the most complicated code you can", "Day 24 - Write the most complicated code you can", "{1103D026-04AE-4E6E-815D-6BAC21DFEA32}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day24", "Day24\Day24\Day24.csproj", "{6030D8E5-29D6-4986-BC81-FD3A065E03F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Day24.Tests", "Day24\Day24.Tests\Day24.Tests.csproj", "{1927374A-387D-48A0-B5C1-162BFBD31BBC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E4531F97-7BA3-4EBC-83C9-2D8C692C02CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4531F97-7BA3-4EBC-83C9-2D8C692C02CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4531F97-7BA3-4EBC-83C9-2D8C692C02CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4531F97-7BA3-4EBC-83C9-2D8C692C02CF}.Release|Any CPU.Build.0 = Release|Any CPU + {E590BBEB-7AB4-402A-8401-2A1C0F527501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E590BBEB-7AB4-402A-8401-2A1C0F527501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E590BBEB-7AB4-402A-8401-2A1C0F527501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E590BBEB-7AB4-402A-8401-2A1C0F527501}.Release|Any CPU.Build.0 = Release|Any CPU + {F812DB10-5139-4153-8EBD-65E6D9620045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F812DB10-5139-4153-8EBD-65E6D9620045}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F812DB10-5139-4153-8EBD-65E6D9620045}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F812DB10-5139-4153-8EBD-65E6D9620045}.Release|Any CPU.Build.0 = Release|Any CPU + {67696132-26E4-4883-87BF-60D5705E61D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67696132-26E4-4883-87BF-60D5705E61D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67696132-26E4-4883-87BF-60D5705E61D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67696132-26E4-4883-87BF-60D5705E61D4}.Release|Any CPU.Build.0 = Release|Any CPU + {42078835-3737-4A25-9593-ED589BF80C54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42078835-3737-4A25-9593-ED589BF80C54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42078835-3737-4A25-9593-ED589BF80C54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42078835-3737-4A25-9593-ED589BF80C54}.Release|Any CPU.Build.0 = Release|Any CPU + {C0386FEA-4627-4958-BCA8-62556E25859D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0386FEA-4627-4958-BCA8-62556E25859D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0386FEA-4627-4958-BCA8-62556E25859D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0386FEA-4627-4958-BCA8-62556E25859D}.Release|Any CPU.Build.0 = Release|Any CPU + {C9D0BF2C-224C-4030-90DD-4ECA2D1D3833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9D0BF2C-224C-4030-90DD-4ECA2D1D3833}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9D0BF2C-224C-4030-90DD-4ECA2D1D3833}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9D0BF2C-224C-4030-90DD-4ECA2D1D3833}.Release|Any CPU.Build.0 = Release|Any CPU + {6E908535-E191-4228-8A9C-E7A06DFD2E11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E908535-E191-4228-8A9C-E7A06DFD2E11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E908535-E191-4228-8A9C-E7A06DFD2E11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E908535-E191-4228-8A9C-E7A06DFD2E11}.Release|Any CPU.Build.0 = Release|Any CPU + {2E6FC488-AF67-4A84-83D5-48BB15164C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E6FC488-AF67-4A84-83D5-48BB15164C28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E6FC488-AF67-4A84-83D5-48BB15164C28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E6FC488-AF67-4A84-83D5-48BB15164C28}.Release|Any CPU.Build.0 = Release|Any CPU + {B6C9C42F-B182-44D0-A598-9E36F80D2959}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6C9C42F-B182-44D0-A598-9E36F80D2959}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6C9C42F-B182-44D0-A598-9E36F80D2959}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6C9C42F-B182-44D0-A598-9E36F80D2959}.Release|Any CPU.Build.0 = Release|Any CPU + {71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC}.Release|Any CPU.Build.0 = Release|Any CPU + {5AED5510-8489-4E06-9546-03F904741BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AED5510-8489-4E06-9546-03F904741BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AED5510-8489-4E06-9546-03F904741BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AED5510-8489-4E06-9546-03F904741BE4}.Release|Any CPU.Build.0 = Release|Any CPU + {E273A593-626C-4EC4-9708-50A733008690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E273A593-626C-4EC4-9708-50A733008690}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E273A593-626C-4EC4-9708-50A733008690}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E273A593-626C-4EC4-9708-50A733008690}.Release|Any CPU.Build.0 = Release|Any CPU + {1F07D5D3-6FCE-4D9D-9054-E12DF63A452A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F07D5D3-6FCE-4D9D-9054-E12DF63A452A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F07D5D3-6FCE-4D9D-9054-E12DF63A452A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F07D5D3-6FCE-4D9D-9054-E12DF63A452A}.Release|Any CPU.Build.0 = Release|Any CPU + {0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3372B6EF-31D1-4782-AD74-A04C6F2CE2A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3372B6EF-31D1-4782-AD74-A04C6F2CE2A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3372B6EF-31D1-4782-AD74-A04C6F2CE2A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3372B6EF-31D1-4782-AD74-A04C6F2CE2A6}.Release|Any CPU.Build.0 = Release|Any CPU + {BC5F2985-2BE0-4652-87DD-F3EEB998768B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC5F2985-2BE0-4652-87DD-F3EEB998768B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC5F2985-2BE0-4652-87DD-F3EEB998768B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC5F2985-2BE0-4652-87DD-F3EEB998768B}.Release|Any CPU.Build.0 = Release|Any CPU + {37EFA90F-E88A-41E3-BD14-F1E94972CF86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37EFA90F-E88A-41E3-BD14-F1E94972CF86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37EFA90F-E88A-41E3-BD14-F1E94972CF86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37EFA90F-E88A-41E3-BD14-F1E94972CF86}.Release|Any CPU.Build.0 = Release|Any CPU + {F987F3A5-7585-40D7-8CB7-F3B29D99B998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F987F3A5-7585-40D7-8CB7-F3B29D99B998}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F987F3A5-7585-40D7-8CB7-F3B29D99B998}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F987F3A5-7585-40D7-8CB7-F3B29D99B998}.Release|Any CPU.Build.0 = Release|Any CPU + {5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE}.Release|Any CPU.Build.0 = Release|Any CPU + {8F81B45C-9BBF-4B84-8394-CF809539C632}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F81B45C-9BBF-4B84-8394-CF809539C632}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F81B45C-9BBF-4B84-8394-CF809539C632}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F81B45C-9BBF-4B84-8394-CF809539C632}.Release|Any CPU.Build.0 = Release|Any CPU + {6CA9F7F3-9B38-4971-AD52-B7601C4FA808}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CA9F7F3-9B38-4971-AD52-B7601C4FA808}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CA9F7F3-9B38-4971-AD52-B7601C4FA808}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CA9F7F3-9B38-4971-AD52-B7601C4FA808}.Release|Any CPU.Build.0 = Release|Any CPU + {80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF}.Release|Any CPU.Build.0 = Release|Any CPU + {3F424E11-0027-4C49-8868-D7F6018FED21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F424E11-0027-4C49-8868-D7F6018FED21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F424E11-0027-4C49-8868-D7F6018FED21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F424E11-0027-4C49-8868-D7F6018FED21}.Release|Any CPU.Build.0 = Release|Any CPU + {A79DF0E5-043A-4848-AE8D-A94D66E34156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A79DF0E5-043A-4848-AE8D-A94D66E34156}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A79DF0E5-043A-4848-AE8D-A94D66E34156}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A79DF0E5-043A-4848-AE8D-A94D66E34156}.Release|Any CPU.Build.0 = Release|Any CPU + {A3400B5F-F984-41BF-8EA7-D9266E102B0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3400B5F-F984-41BF-8EA7-D9266E102B0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3400B5F-F984-41BF-8EA7-D9266E102B0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3400B5F-F984-41BF-8EA7-D9266E102B0A}.Release|Any CPU.Build.0 = Release|Any CPU + {80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0}.Release|Any CPU.Build.0 = Release|Any CPU + {65BD9353-3CC9-454D-B915-E9388566184A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65BD9353-3CC9-454D-B915-E9388566184A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65BD9353-3CC9-454D-B915-E9388566184A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65BD9353-3CC9-454D-B915-E9388566184A}.Release|Any CPU.Build.0 = Release|Any CPU + {36316272-5E4D-4326-BD3E-3AFA5C221C99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36316272-5E4D-4326-BD3E-3AFA5C221C99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36316272-5E4D-4326-BD3E-3AFA5C221C99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36316272-5E4D-4326-BD3E-3AFA5C221C99}.Release|Any CPU.Build.0 = Release|Any CPU + {534D7E0A-9571-42BD-895F-73D9478A7156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {534D7E0A-9571-42BD-895F-73D9478A7156}.Debug|Any CPU.Build.0 = Debug|Any CPU + {534D7E0A-9571-42BD-895F-73D9478A7156}.Release|Any CPU.ActiveCfg = Release|Any CPU + {534D7E0A-9571-42BD-895F-73D9478A7156}.Release|Any CPU.Build.0 = Release|Any CPU + {999AF80D-A39A-4C38-8E22-52AD308E2DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {999AF80D-A39A-4C38-8E22-52AD308E2DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {999AF80D-A39A-4C38-8E22-52AD308E2DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {999AF80D-A39A-4C38-8E22-52AD308E2DE9}.Release|Any CPU.Build.0 = Release|Any CPU + {8607CFE8-70E1-42DE-8B87-246E4F1F947F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8607CFE8-70E1-42DE-8B87-246E4F1F947F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8607CFE8-70E1-42DE-8B87-246E4F1F947F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8607CFE8-70E1-42DE-8B87-246E4F1F947F}.Release|Any CPU.Build.0 = Release|Any CPU + {EF583C28-D8A4-416E-A311-0C570286D686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF583C28-D8A4-416E-A311-0C570286D686}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF583C28-D8A4-416E-A311-0C570286D686}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF583C28-D8A4-416E-A311-0C570286D686}.Release|Any CPU.Build.0 = Release|Any CPU + {478BFE02-2699-4150-B31F-407C7DDE1BB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {478BFE02-2699-4150-B31F-407C7DDE1BB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {478BFE02-2699-4150-B31F-407C7DDE1BB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {478BFE02-2699-4150-B31F-407C7DDE1BB1}.Release|Any CPU.Build.0 = Release|Any CPU + {98920AED-928E-49AA-AEE3-CA64DB29AEA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98920AED-928E-49AA-AEE3-CA64DB29AEA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98920AED-928E-49AA-AEE3-CA64DB29AEA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98920AED-928E-49AA-AEE3-CA64DB29AEA7}.Release|Any CPU.Build.0 = Release|Any CPU + {623BC3DF-0C4E-464F-ADBA-DCA5212C4306}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {623BC3DF-0C4E-464F-ADBA-DCA5212C4306}.Debug|Any CPU.Build.0 = Debug|Any CPU + {623BC3DF-0C4E-464F-ADBA-DCA5212C4306}.Release|Any CPU.ActiveCfg = Release|Any CPU + {623BC3DF-0C4E-464F-ADBA-DCA5212C4306}.Release|Any CPU.Build.0 = Release|Any CPU + {A06B5B1F-1284-4D45-B647-A378830DDF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A06B5B1F-1284-4D45-B647-A378830DDF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A06B5B1F-1284-4D45-B647-A378830DDF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A06B5B1F-1284-4D45-B647-A378830DDF1A}.Release|Any CPU.Build.0 = Release|Any CPU + {EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85}.Release|Any CPU.Build.0 = Release|Any CPU + {9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904}.Release|Any CPU.Build.0 = Release|Any CPU + {6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95}.Release|Any CPU.Build.0 = Release|Any CPU + {651BEFA9-E0C9-4C27-BC37-D679B2FDD95C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {651BEFA9-E0C9-4C27-BC37-D679B2FDD95C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {651BEFA9-E0C9-4C27-BC37-D679B2FDD95C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {651BEFA9-E0C9-4C27-BC37-D679B2FDD95C}.Release|Any CPU.Build.0 = Release|Any CPU + {57F7115A-2E0F-47DE-A0B2-DD043E929B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57F7115A-2E0F-47DE-A0B2-DD043E929B47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57F7115A-2E0F-47DE-A0B2-DD043E929B47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57F7115A-2E0F-47DE-A0B2-DD043E929B47}.Release|Any CPU.Build.0 = Release|Any CPU + {A11D1D12-A267-4A94-B020-C86D88A8FD12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A11D1D12-A267-4A94-B020-C86D88A8FD12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A11D1D12-A267-4A94-B020-C86D88A8FD12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A11D1D12-A267-4A94-B020-C86D88A8FD12}.Release|Any CPU.Build.0 = Release|Any CPU + {090A8693-38AF-4AE4-92CF-5987BB9508AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {090A8693-38AF-4AE4-92CF-5987BB9508AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {090A8693-38AF-4AE4-92CF-5987BB9508AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {090A8693-38AF-4AE4-92CF-5987BB9508AE}.Release|Any CPU.Build.0 = Release|Any CPU + {5FB3E705-A670-48F3-95BD-06309D9C145A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FB3E705-A670-48F3-95BD-06309D9C145A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FB3E705-A670-48F3-95BD-06309D9C145A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FB3E705-A670-48F3-95BD-06309D9C145A}.Release|Any CPU.Build.0 = Release|Any CPU + {D461192A-11BF-40B6-8BA8-AED8B49C8C68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D461192A-11BF-40B6-8BA8-AED8B49C8C68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D461192A-11BF-40B6-8BA8-AED8B49C8C68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D461192A-11BF-40B6-8BA8-AED8B49C8C68}.Release|Any CPU.Build.0 = Release|Any CPU + {6030D8E5-29D6-4986-BC81-FD3A065E03F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6030D8E5-29D6-4986-BC81-FD3A065E03F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6030D8E5-29D6-4986-BC81-FD3A065E03F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6030D8E5-29D6-4986-BC81-FD3A065E03F9}.Release|Any CPU.Build.0 = Release|Any CPU + {1927374A-387D-48A0-B5C1-162BFBD31BBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1927374A-387D-48A0-B5C1-162BFBD31BBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1927374A-387D-48A0-B5C1-162BFBD31BBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1927374A-387D-48A0-B5C1-162BFBD31BBC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {E4531F97-7BA3-4EBC-83C9-2D8C692C02CF} = {1B18AD70-29A4-4D6F-A9CC-90062090D789} + {E590BBEB-7AB4-402A-8401-2A1C0F527501} = {1B18AD70-29A4-4D6F-A9CC-90062090D789} + {F812DB10-5139-4153-8EBD-65E6D9620045} = {6D089E60-B349-468E-BC1D-3DC4DC7D6C51} + {67696132-26E4-4883-87BF-60D5705E61D4} = {6D089E60-B349-468E-BC1D-3DC4DC7D6C51} + {42078835-3737-4A25-9593-ED589BF80C54} = {D17C0749-D555-465F-A07A-826AE7BD025E} + {C0386FEA-4627-4958-BCA8-62556E25859D} = {D17C0749-D555-465F-A07A-826AE7BD025E} + {C9D0BF2C-224C-4030-90DD-4ECA2D1D3833} = {10BCF13E-C7CA-4A89-86CD-0E8047139AA8} + {6E908535-E191-4228-8A9C-E7A06DFD2E11} = {10BCF13E-C7CA-4A89-86CD-0E8047139AA8} + {2E6FC488-AF67-4A84-83D5-48BB15164C28} = {35D192B7-F9F6-41BB-8163-7595E3ADE21B} + {B6C9C42F-B182-44D0-A598-9E36F80D2959} = {35D192B7-F9F6-41BB-8163-7595E3ADE21B} + {71D47553-F3ED-4F49-BA2E-FAA5F73EFEFC} = {B4B695B1-9429-4137-8211-691FE187A916} + {5AED5510-8489-4E06-9546-03F904741BE4} = {B4B695B1-9429-4137-8211-691FE187A916} + {E273A593-626C-4EC4-9708-50A733008690} = {23CC6A12-0FD6-429F-AE41-7F74C443B0AB} + {1F07D5D3-6FCE-4D9D-9054-E12DF63A452A} = {23CC6A12-0FD6-429F-AE41-7F74C443B0AB} + {0262E2C7-135C-46F7-AEEC-E6FC4B13E7A8} = {8EB0D086-66B2-41DA-9DD0-8B55585E6138} + {3372B6EF-31D1-4782-AD74-A04C6F2CE2A6} = {8EB0D086-66B2-41DA-9DD0-8B55585E6138} + {BC5F2985-2BE0-4652-87DD-F3EEB998768B} = {F9C6D3A8-6178-4AD7-888D-9281C7E5CD6F} + {37EFA90F-E88A-41E3-BD14-F1E94972CF86} = {F9C6D3A8-6178-4AD7-888D-9281C7E5CD6F} + {F987F3A5-7585-40D7-8CB7-F3B29D99B998} = {BE5956AD-0A92-4390-B15E-123BD6D348E6} + {5ABAEE51-2C14-4186-AB6F-AF06ADFBCEDE} = {BE5956AD-0A92-4390-B15E-123BD6D348E6} + {8F81B45C-9BBF-4B84-8394-CF809539C632} = {5731AE6D-76BF-48D1-9B19-4DF9E56D4BD1} + {6CA9F7F3-9B38-4971-AD52-B7601C4FA808} = {5731AE6D-76BF-48D1-9B19-4DF9E56D4BD1} + {80DF89DB-365A-4DF2-9A6D-DD852CA5F1BF} = {61F6F0AE-8D1E-479E-A878-A0A337EE8E92} + {3F424E11-0027-4C49-8868-D7F6018FED21} = {61F6F0AE-8D1E-479E-A878-A0A337EE8E92} + {A79DF0E5-043A-4848-AE8D-A94D66E34156} = {3CFC8F6C-2B2A-4FE5-BC2B-DDF3E2AE0B4C} + {A3400B5F-F984-41BF-8EA7-D9266E102B0A} = {3CFC8F6C-2B2A-4FE5-BC2B-DDF3E2AE0B4C} + {80CD7AEB-D2EB-48C5-9420-B9C85A18E3D0} = {5E022707-C82F-403F-8A3E-659271B12E71} + {65BD9353-3CC9-454D-B915-E9388566184A} = {5E022707-C82F-403F-8A3E-659271B12E71} + {36316272-5E4D-4326-BD3E-3AFA5C221C99} = {24662303-5A3F-4356-A8AF-A5E2E866A7E8} + {534D7E0A-9571-42BD-895F-73D9478A7156} = {24662303-5A3F-4356-A8AF-A5E2E866A7E8} + {999AF80D-A39A-4C38-8E22-52AD308E2DE9} = {8241AC18-B1E7-4396-BE6F-0F514A8FCE12} + {8607CFE8-70E1-42DE-8B87-246E4F1F947F} = {8241AC18-B1E7-4396-BE6F-0F514A8FCE12} + {EF583C28-D8A4-416E-A311-0C570286D686} = {17352B10-55B2-4E4C-980C-29C1ED192B40} + {478BFE02-2699-4150-B31F-407C7DDE1BB1} = {17352B10-55B2-4E4C-980C-29C1ED192B40} + {98920AED-928E-49AA-AEE3-CA64DB29AEA7} = {1E6BFC0D-0B6A-4419-B55C-E52035225B66} + {623BC3DF-0C4E-464F-ADBA-DCA5212C4306} = {1E6BFC0D-0B6A-4419-B55C-E52035225B66} + {A06B5B1F-1284-4D45-B647-A378830DDF1A} = {E96B25E8-46D0-431E-A249-72F093C83372} + {EE7DC8C1-9049-4DF4-9B34-3F899FD6AB85} = {E96B25E8-46D0-431E-A249-72F093C83372} + {9C4F52C8-39DC-48B2-B4D9-5B4E12B7E904} = {E90B121F-C580-4C0E-9958-367EB5EA9706} + {6F3C5CD2-6D5F-4B8E-8227-D1BCC82B2A95} = {E90B121F-C580-4C0E-9958-367EB5EA9706} + {651BEFA9-E0C9-4C27-BC37-D679B2FDD95C} = {9644433D-8B7D-4C24-A642-13C500107FBF} + {57F7115A-2E0F-47DE-A0B2-DD043E929B47} = {9644433D-8B7D-4C24-A642-13C500107FBF} + {A11D1D12-A267-4A94-B020-C86D88A8FD12} = {470065A1-F961-4E64-8889-52849A9BE2FA} + {090A8693-38AF-4AE4-92CF-5987BB9508AE} = {470065A1-F961-4E64-8889-52849A9BE2FA} + {5FB3E705-A670-48F3-95BD-06309D9C145A} = {E6945681-959A-4F52-B533-15E6130B6193} + {D461192A-11BF-40B6-8BA8-AED8B49C8C68} = {E6945681-959A-4F52-B533-15E6130B6193} + {6030D8E5-29D6-4986-BC81-FD3A065E03F9} = {1103D026-04AE-4E6E-815D-6BAC21DFEA32} + {1927374A-387D-48A0-B5C1-162BFBD31BBC} = {1103D026-04AE-4E6E-815D-6BAC21DFEA32} + EndGlobalSection +EndGlobal diff --git a/exercise/c#/Day01/Day01.Tests/Day01.Tests.csproj b/exercise/c#/Day01/Day01.Tests/Day01.Tests.csproj new file mode 100644 index 00000000..132fc427 --- /dev/null +++ b/exercise/c#/Day01/Day01.Tests/Day01.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day01/Day01.Tests/EdibleTests.cs b/exercise/c#/Day01/Day01.Tests/EdibleTests.cs new file mode 100644 index 00000000..d28188ca --- /dev/null +++ b/exercise/c#/Day01/Day01.Tests/EdibleTests.cs @@ -0,0 +1,40 @@ +using FluentAssertions; +using Xunit; + +namespace Day01.Tests +{ + public class EdibleTests + { + private static readonly DateOnly ExpirationDate = new(2023, 12, 1); + private static readonly Guid Inspector = Guid.NewGuid(); + private static readonly DateOnly NotFreshDate = ExpirationDate.AddDays(7); + private static readonly DateOnly FreshDate = ExpirationDate.AddDays(-7); + + public static IEnumerable NotEdibleFood() + { + return new List + { + new object[] {true, Inspector, NotFreshDate}, + new object[] {false, Inspector, FreshDate}, + new object?[] {true, null, FreshDate}, + new object?[] {false, null, NotFreshDate}, + new object?[] {false, null, FreshDate} + }; + } + + [Theory] + [MemberData(nameof(NotEdibleFood))] + public void Not_Edible_If_Not_Fresh(bool approvedForConsumption, Guid? inspectorId, DateOnly now) + => new Food(ExpirationDate, approvedForConsumption, inspectorId) + .IsEdible(() => now) + .Should() + .BeFalse(); + + [Fact] + public void EdibleFood() + => new Food(ExpirationDate, true, Inspector) + .IsEdible(() => FreshDate) + .Should() + .BeTrue(); + } +} \ No newline at end of file diff --git a/exercise/c#/Day01/Day01/Day01.csproj b/exercise/c#/Day01/Day01/Day01.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day01/Day01/Day01.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day01/Day01/Food.cs b/exercise/c#/Day01/Day01/Food.cs new file mode 100644 index 00000000..986ebe1c --- /dev/null +++ b/exercise/c#/Day01/Day01/Food.cs @@ -0,0 +1,17 @@ +namespace Day01 +{ + public record Food( + DateOnly ExpirationDate, + bool ApprovedForConsumption, + Guid? InspectorId) + { + public bool IsEdible(Func now) + { + if (ExpirationDate.CompareTo(now()) > 0 && + ApprovedForConsumption && + InspectorId != null) + return true; + return false; + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day02/Day02.Tests/Day02.Tests.csproj b/exercise/c#/Day02/Day02.Tests/Day02.Tests.csproj new file mode 100644 index 00000000..9ba3b108 --- /dev/null +++ b/exercise/c#/Day02/Day02.Tests/Day02.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day02/Day02.Tests/FizzBuzzTests.cs b/exercise/c#/Day02/Day02.Tests/FizzBuzzTests.cs new file mode 100644 index 00000000..cb9be7e8 --- /dev/null +++ b/exercise/c#/Day02/Day02.Tests/FizzBuzzTests.cs @@ -0,0 +1,85 @@ +using FluentAssertions; +using Xunit; + +namespace Day02.Tests +{ + public class FizzBuzzTests + { + #region "Normal" numbers + + [Fact] + public void Returns_The_Given_Number_For_1() => FizzBuzz.Convert(1).Should().Be("1"); + + [Fact] + public void Returns_The_Given_Number_For_67() => FizzBuzz.Convert(67).Should().Be("67"); + + [Fact] + public void Returns_The_Given_Number_For_82() => FizzBuzz.Convert(82).Should().Be("82"); + + #endregion + + #region Fizz + + [Fact] + public void Returns_Fizz_For_3() => FizzBuzz.Convert(3).Should().Be("Fizz"); + + [Fact] + public void Returns_Fizz_For_66() => FizzBuzz.Convert(66).Should().Be("Fizz"); + + [Fact] + public void Returns_Fizz_For_99() => FizzBuzz.Convert(99).Should().Be("Fizz"); + + #endregion + + #region Buzz + + [Fact] + public void Returns_Buzz_For_5() => FizzBuzz.Convert(5).Should().Be("Buzz"); + + [Fact] + public void Returns_Buzz_For_50() => FizzBuzz.Convert(50).Should().Be("Buzz"); + + [Fact] + public void Returns_Buzz_For_85() => FizzBuzz.Convert(85).Should().Be("Buzz"); + + #endregion + + #region FizzBuzz + + [Fact] + public void Returns_FizzBuzz_For_15() => FizzBuzz.Convert(15).Should().Be("FizzBuzz"); + + [Fact] + public void Returns_FizzBuzz_For_30() => FizzBuzz.Convert(30).Should().Be("FizzBuzz"); + + [Fact] + public void Returns_FizzBuzz_For_45() => FizzBuzz.Convert(45).Should().Be("FizzBuzz"); + + #endregion + + #region Failures + + [Fact] + public void Throws_An_Exception_For_0() + { + var act = () => FizzBuzz.Convert(0); + act.Should().Throw(); + } + + [Fact] + public void Throws_An_Exception_For_101() + { + var act = () => FizzBuzz.Convert(101); + act.Should().Throw(); + } + + [Fact] + public void Throws_An_Exception_For_Minus_1() + { + var act = () => FizzBuzz.Convert(-1); + act.Should().Throw(); + } + + #endregion + } +} \ No newline at end of file diff --git a/exercise/c#/Day02/Day02/Day02.csproj b/exercise/c#/Day02/Day02/Day02.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day02/Day02/Day02.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day02/Day02/FizzBuzz.cs b/exercise/c#/Day02/Day02/FizzBuzz.cs new file mode 100644 index 00000000..dd4a56fb --- /dev/null +++ b/exercise/c#/Day02/Day02/FizzBuzz.cs @@ -0,0 +1,39 @@ +namespace Day02 +{ + public static class FizzBuzz + { + public static string Convert(int input) + { + if (input > 0) + { + if (input <= 100) + { + if (input % 3 == 0 && input % 5 == 0) + { + return "FizzBuzz"; + } + + if (input % 3 == 0) + { + return "Fizz"; + } + + if (input % 5 == 0) + { + return "Buzz"; + } + + return input.ToString(); + } + else + { + throw new OutOfRangeException(); + } + } + else + { + throw new OutOfRangeException(); + } + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day02/Day02/OutOfRangeException.cs b/exercise/c#/Day02/Day02/OutOfRangeException.cs new file mode 100644 index 00000000..7b422ce3 --- /dev/null +++ b/exercise/c#/Day02/Day02/OutOfRangeException.cs @@ -0,0 +1,6 @@ +namespace Day02 +{ + public sealed class OutOfRangeException : ArgumentException + { + } +} \ No newline at end of file diff --git a/exercise/c#/Day03/Day03.Tests/Day03.Tests.csproj b/exercise/c#/Day03/Day03.Tests/Day03.Tests.csproj new file mode 100644 index 00000000..32fc22f7 --- /dev/null +++ b/exercise/c#/Day03/Day03.Tests/Day03.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day03/Day03.Tests/PopulationTests.cs b/exercise/c#/Day03/Day03.Tests/PopulationTests.cs new file mode 100644 index 00000000..f084886b --- /dev/null +++ b/exercise/c#/Day03/Day03.Tests/PopulationTests.cs @@ -0,0 +1,30 @@ +using FluentAssertions; +using Xunit; +using static Day03.PetType; + +namespace Day03.Tests +{ + public class PopulationTests + { + private static readonly IEnumerable Population = new List + { + new("Peter", "Griffin", new Pet(Cat, "Tabby", 2)), + new("Stewie", "Griffin", new Pet(Cat, "Dolly", 3), new Pet(Dog, "Brian", 9)), + new("Joe", "Swanson", new Pet(Dog, "Spike", 4)), + new("Lois", "Griffin", new Pet(Snake, "Serpy", 1)), + new("Meg", "Griffin", new Pet(Bird, "Tweety", 1)), + new("Chris", "Griffin", new Pet(Turtle, "Speedy", 4)), + new("Cleveland", "Brown", new Pet(Hamster, "Fuzzy", 1), new Pet(Hamster, "Wuzzy", 2)), + new("Glenn", "Quagmire") + }; + + [Fact] + public void Who_Owns_The_Youngest_Pet() + { + var filtered = Population.MinBy(person => { var youngestPetByAge = person.Pets.MinBy(p => p.Age); return youngestPetByAge?.Age ?? int.MaxValue; }); + + filtered.Should().NotBeNull(); + filtered!.FirstName.Should().Be("Lois"); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day03/Day03/Day03.csproj b/exercise/c#/Day03/Day03/Day03.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day03/Day03/Day03.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day03/Day03/Person.cs b/exercise/c#/Day03/Day03/Person.cs new file mode 100644 index 00000000..9e6c86a9 --- /dev/null +++ b/exercise/c#/Day03/Day03/Person.cs @@ -0,0 +1,16 @@ +namespace Day03 +{ + public record Person(string FirstName, string LastName, params Pet[] Pets); + + public record Pet(PetType Type, string Name, int Age); + + public enum PetType + { + Cat, + Dog, + Hamster, + Turtle, + Bird, + Snake + } +} \ No newline at end of file diff --git a/exercise/c#/Day04/Day04.Tests/ArticleTests.cs b/exercise/c#/Day04/Day04.Tests/ArticleTests.cs new file mode 100644 index 00000000..ee457791 --- /dev/null +++ b/exercise/c#/Day04/Day04.Tests/ArticleTests.cs @@ -0,0 +1,79 @@ +using FluentAssertions; +using Xunit; + +namespace Day04.Tests +{ + public class ArticleTests + { + [Fact] + public void It_Should_Add_Valid_Comment() + { + var article = new Article( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + + article.AddComment("Amazing article !!!", "Pablo Escobar"); + } + + [Fact] + public void It_Should_Add_A_Comment_With_The_Given_Text() + { + var article = new Article( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + + const string text = "Amazing article !!!"; + article.AddComment(text, "Pablo Escobar"); + + article.Comments + .Should().HaveCount(1) + .And.ContainSingle(comment => comment.Text == text); + } + + [Fact] + public void It_Should_Add_A_Comment_With_The_Given_Author() + { + var article = new Article( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + + const string author = "Pablo Escobar"; + article.AddComment("Amazing article !!!", author); + + article.Comments + .Should().HaveCount(1) + .And.ContainSingle(comment => comment.Author == author); + } + + [Fact] + public void It_Should_Add_A_Comment_With_The_Date_Of_The_Day() + { + var article = new Article( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + + article.AddComment("Amazing article !!!", "Pablo Escobar"); + + var today = DateOnly.FromDateTime(DateTime.Today); + article.Comments + .Should().ContainSingle(comment => comment.CreationDate == today); + } + + [Fact] + public void It_Should_Throw_An_Exception_When_Adding_Existing_Comment() + { + var article = new Article( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + article.AddComment("Amazing article !!!", "Pablo Escobar"); + + var act = () => article.AddComment("Amazing article !!!", "Pablo Escobar"); + act.Should().Throw(); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day04/Day04.Tests/Day04.Tests.csproj b/exercise/c#/Day04/Day04.Tests/Day04.Tests.csproj new file mode 100644 index 00000000..dd81e68a --- /dev/null +++ b/exercise/c#/Day04/Day04.Tests/Day04.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day04/Day04/Blog.cs b/exercise/c#/Day04/Day04/Blog.cs new file mode 100644 index 00000000..9b4785c5 --- /dev/null +++ b/exercise/c#/Day04/Day04/Blog.cs @@ -0,0 +1,27 @@ +namespace Day04 +{ + public class Article(string name, string content) + { + public List Comments { get; } = []; + + private void AddComment( + string text, + string author, + DateOnly creationDate) + { + var comment = new Comment(text, author, creationDate); + if (Comments.Contains(comment)) + { + throw new CommentAlreadyExistException(); + } + else Comments.Add(comment); + } + + public void AddComment(string text, string author) + => AddComment(text, author, DateOnly.FromDateTime(DateTime.Now)); + } + + public record Comment(string Text, string Author, DateOnly CreationDate); + + public class CommentAlreadyExistException : ArgumentException; +} \ No newline at end of file diff --git a/exercise/c#/Day04/Day04/Day04.csproj b/exercise/c#/Day04/Day04/Day04.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day04/Day04/Day04.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day05/Day05.Tests/Day05.Tests.csproj b/exercise/c#/Day05/Day05.Tests/Day05.Tests.csproj new file mode 100644 index 00000000..cfbf9dcd --- /dev/null +++ b/exercise/c#/Day05/Day05.Tests/Day05.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day05/Day05.Tests/PopulationTests.cs b/exercise/c#/Day05/Day05.Tests/PopulationTests.cs new file mode 100644 index 00000000..9adbff1e --- /dev/null +++ b/exercise/c#/Day05/Day05.Tests/PopulationTests.cs @@ -0,0 +1,86 @@ +using System.Text; +using FluentAssertions; +using Xunit; +using static System.Environment; +using static Day05.PetType; + +namespace Day05.Tests +{ + public class PopulationTests + { + private static readonly IEnumerable Population = new List + { + new("Peter", "Griffin", new Pet(Cat, "Tabby", 2)), + new("Stewie", "Griffin", new Pet(Cat, "Dolly", 3), new Pet(Dog, "Brian", 9)), + new("Joe", "Swanson", new Pet(Dog, "Spike", 4)), + new("Lois", "Griffin", new Pet(Snake, "Serpy", 1)), + new("Meg", "Griffin", new Pet(Bird, "Tweety", 1)), + new("Chris", "Griffin", new Pet(Turtle, "Speedy", 4)), + new("Cleveland", "Brown", new Pet(Hamster, "Fuzzy", 1), new Pet(Hamster, "Wuzzy", 2)), + new("Glenn", "Quagmire") + }; + + [Fact] + public void People_With_Their_Pets() + { + var response = FormatPopulation(); + + response.ToString() + .Should() + .Be(""" + Peter Griffin who owns : Tabby + Stewie Griffin who owns : Dolly Brian + Joe Swanson who owns : Spike + Lois Griffin who owns : Serpy + Meg Griffin who owns : Tweety + Chris Griffin who owns : Speedy + Cleveland Brown who owns : Fuzzy Wuzzy + Glenn Quagmire + """); + } + + private static StringBuilder FormatPopulation() + { + var response = new StringBuilder(); + + foreach (var person in Population) + { + response.Append($"{person.FirstName} {person.LastName}"); + + if (person.Pets.Length > 0) + { + response.Append(" who owns : "); + } + + foreach (var pet in person.Pets) + { + response.Append($"{pet.Name}"); + + if (pet != person.Pets.Last()) + { + response.Append(' '); + } + } + + if (person != Population.Last()) + { + response.Append(NewLine); + } + } + + return response; + } + + [Fact] + public void Who_Owns_The_Youngest_Pet() + { + var filtered = Population.MinBy(YoungestPetAgeOfThePerson); + + filtered.Should().NotBeNull(); + filtered!.FirstName.Should().Be("Lois"); + } + + private static int YoungestPetAgeOfThePerson(Person person) => + person.Pets.MinBy(p => p.Age)?.Age ?? int.MaxValue; + } +} \ No newline at end of file diff --git a/exercise/c#/Day05/Day05/Day05.csproj b/exercise/c#/Day05/Day05/Day05.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day05/Day05/Day05.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day05/Day05/Person.cs b/exercise/c#/Day05/Day05/Person.cs new file mode 100644 index 00000000..cc8d790d --- /dev/null +++ b/exercise/c#/Day05/Day05/Person.cs @@ -0,0 +1,16 @@ +namespace Day05 +{ + public record Person(string FirstName, string LastName, params Pet[] Pets); + + public record Pet(PetType Type, string Name, int Age); + + public enum PetType + { + Cat, + Dog, + Hamster, + Turtle, + Bird, + Snake + } +} \ No newline at end of file diff --git a/exercise/c#/Day06/Day06.Tests/Day06.Tests.csproj b/exercise/c#/Day06/Day06.Tests/Day06.Tests.csproj new file mode 100644 index 00000000..1df9800b --- /dev/null +++ b/exercise/c#/Day06/Day06.Tests/Day06.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day06/Day06.Tests/FizzBuzzTests.cs b/exercise/c#/Day06/Day06.Tests/FizzBuzzTests.cs new file mode 100644 index 00000000..d048a465 --- /dev/null +++ b/exercise/c#/Day06/Day06.Tests/FizzBuzzTests.cs @@ -0,0 +1,85 @@ +using FluentAssertions; +using Xunit; + +namespace Day06.Tests +{ + public class FizzBuzzTests + { + #region "Normal" numbers + + [Fact] + public void Returns_The_Given_Number_For_1() => FizzBuzz.Convert(1).Should().Be("1"); + + [Fact] + public void Returns_The_Given_Number_For_67() => FizzBuzz.Convert(67).Should().Be("67"); + + [Fact] + public void Returns_The_Given_Number_For_82() => FizzBuzz.Convert(82).Should().Be("82"); + + #endregion + + #region Fizz + + [Fact] + public void Returns_Fizz_For_3() => FizzBuzz.Convert(3).Should().Be("Fizz"); + + [Fact] + public void Returns_Fizz_For_66() => FizzBuzz.Convert(66).Should().Be("Fizz"); + + [Fact] + public void Returns_Fizz_For_99() => FizzBuzz.Convert(99).Should().Be("Fizz"); + + #endregion + + #region Buzz + + [Fact] + public void Returns_Buzz_For_5() => FizzBuzz.Convert(5).Should().Be("Buzz"); + + [Fact] + public void Returns_Buzz_For_50() => FizzBuzz.Convert(50).Should().Be("Buzz"); + + [Fact] + public void Returns_Buzz_For_85() => FizzBuzz.Convert(85).Should().Be("Buzz"); + + #endregion + + #region FizzBuzz + + [Fact] + public void Returns_FizzBuzz_For_15() => FizzBuzz.Convert(15).Should().Be("FizzBuzz"); + + [Fact] + public void Returns_FizzBuzz_For_30() => FizzBuzz.Convert(30).Should().Be("FizzBuzz"); + + [Fact] + public void Returns_FizzBuzz_For_45() => FizzBuzz.Convert(45).Should().Be("FizzBuzz"); + + #endregion + + #region Failures + + [Fact] + public void Throws_An_Exception_For_0() + { + var act = () => FizzBuzz.Convert(0); + act.Should().Throw(); + } + + [Fact] + public void Throws_An_Exception_For_101() + { + var act = () => FizzBuzz.Convert(101); + act.Should().Throw(); + } + + [Fact] + public void Throws_An_Exception_For_Minus_1() + { + var act = () => FizzBuzz.Convert(-1); + act.Should().Throw(); + } + + #endregion + } +} \ No newline at end of file diff --git a/exercise/c#/Day06/Day06/Day06.csproj b/exercise/c#/Day06/Day06/Day06.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day06/Day06/Day06.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day06/Day06/FizzBuzz.cs b/exercise/c#/Day06/Day06/FizzBuzz.cs new file mode 100644 index 00000000..464d3195 --- /dev/null +++ b/exercise/c#/Day06/Day06/FizzBuzz.cs @@ -0,0 +1,32 @@ +namespace Day06 +{ + public static class FizzBuzz + { + private const int Min = 0; + private const int Max = 100; + private const int Fizz = 3; + private const int Buzz = 5; + private const int Fizz_Buzz = 15; + + public static string Convert(int input) + => IsOutOfRange(input) + ? throw new OutOfRangeException() + : ConvertSafely(input); + + private static string ConvertSafely(int input) + { + if (Is(Fizz_Buzz, input)) + return "FizzBuzz"; + if (Is(Fizz, input)) + return "Fizz"; + if (Is(Buzz, input)) + return "Buzz"; + + return input.ToString(); + } + + private static bool Is(int divisor, int input) => input % divisor == 0; + + private static bool IsOutOfRange(int input) => input is <= Min or > Max; + } +} \ No newline at end of file diff --git a/exercise/c#/Day06/Day06/OutOfRangeException.cs b/exercise/c#/Day06/Day06/OutOfRangeException.cs new file mode 100644 index 00000000..25f3bb09 --- /dev/null +++ b/exercise/c#/Day06/Day06/OutOfRangeException.cs @@ -0,0 +1,6 @@ +namespace Day06 +{ + public sealed class OutOfRangeException : ArgumentException + { + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07.Tests/Day07.Tests.csproj b/exercise/c#/Day07/Day07.Tests/Day07.Tests.csproj new file mode 100644 index 00000000..531f16d5 --- /dev/null +++ b/exercise/c#/Day07/Day07.Tests/Day07.Tests.csproj @@ -0,0 +1,31 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day07/Day07.Tests/Doubles/CapturingLogger.cs b/exercise/c#/Day07/Day07.Tests/Doubles/CapturingLogger.cs new file mode 100644 index 00000000..2862e8df --- /dev/null +++ b/exercise/c#/Day07/Day07.Tests/Doubles/CapturingLogger.cs @@ -0,0 +1,12 @@ +using Day07.CI.Dependencies; + +namespace Day07.Tests.Doubles +{ + public class CapturingLogger : ILogger + { + private readonly List _lines = []; + public void Info(string message) => _lines.Add($"INFO: {message}"); + public void Error(string message) => _lines.Add($"ERROR: {message}"); + public IReadOnlyList LoggedLines => _lines; + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07.Tests/PipelineTests.cs b/exercise/c#/Day07/Day07.Tests/PipelineTests.cs new file mode 100644 index 00000000..3b7c745b --- /dev/null +++ b/exercise/c#/Day07/Day07.Tests/PipelineTests.cs @@ -0,0 +1,207 @@ +using Day07.CI; +using Day07.CI.Dependencies; +using Day07.Tests.Doubles; +using FluentAssertions; +using NSubstitute; +using Xunit; +using static Day07.CI.Dependencies.TestStatus; +using static NSubstitute.Arg; + +namespace Day07.Tests +{ + public class PipelineTests + { + private readonly IConfig _config = Substitute.For(); + private readonly CapturingLogger _log = new(); + private readonly IEmailer _emailer = Substitute.For(); + private readonly Pipeline _pipeline; + + public PipelineTests() => _pipeline = new Pipeline(_config, _emailer, _log); + + [Fact] + public void Project_With_Tests_That_Deploys_Successfully_With_Email_Notification() + { + _config.SendEmailSummary().Returns(true); + + var project = Project.Builder() + .With(PassingTests) + .Deployed(true) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: Tests passed", + "INFO: Deployment successful", + "INFO: Sending email"); + + _emailer.Received(1).Send("Deployment completed successfully"); + } + + [Fact] + public void Project_Without_Tests_That_Deploys_Successfully_With_Email_Notification() + { + _config.SendEmailSummary().Returns(true); + + var project = Project.Builder() + .With(NoTests) + .Deployed(true) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: No tests", + "INFO: Deployment successful", + "INFO: Sending email"); + + _emailer.Received(1).Send("Deployment completed successfully"); + } + + [Fact] + public void Project_Without_Tests_That_Deploys_Successfully_Without_Email_Notification() + { + _config.SendEmailSummary().Returns(false); + + var project = Project.Builder() + .With(NoTests) + .Deployed(true) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: No tests", + "INFO: Deployment successful", + "INFO: Email disabled"); + + _emailer.DidNotReceive().Send(Any()); + } + + [Fact] + public void Project_With_Tests_That_Fail_With_Email_Notification() + { + _config.SendEmailSummary().Returns(true); + + var project = Project.Builder() + .With(FailingTests) + .Deployed(true) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("ERROR: Tests failed", + "INFO: Sending email"); + + _emailer.Received(1).Send("Tests failed"); + } + + [Fact] + public void Project_With_Tests_That_Fail_Without_Email_Notification() + { + _config.SendEmailSummary().Returns(false); + + var project = Project.Builder() + .With(FailingTests) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("ERROR: Tests failed", + "INFO: Email disabled"); + + _emailer.DidNotReceive().Send(Any()); + } + + [Fact] + public void Project_With_Tests_And_Failing_Build_With_Email_Notification() + { + _config.SendEmailSummary().Returns(true); + + var project = Project.Builder() + .With(PassingTests) + .Deployed(false) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: Tests passed", + "ERROR: Deployment failed", + "INFO: Sending email"); + + _emailer.Received(1).Send("Deployment failed"); + } + + [Fact] + public void Project_With_Tests_And_Failing_Build_Without_Email_Notification() + { + _config.SendEmailSummary().Returns(false); + + var project = Project.Builder() + .With(PassingTests) + .Deployed(false) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: Tests passed", + "ERROR: Deployment failed", + "INFO: Email disabled"); + + _emailer.DidNotReceive().Send(Any()); + } + + [Fact] + public void Project_Without_Tests_And_Failing_Build_With_Email_Notification() + { + _config.SendEmailSummary().Returns(true); + + var project = Project.Builder() + .With(NoTests) + .Deployed(false) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: No tests", + "ERROR: Deployment failed", + "INFO: Sending email"); + + _emailer.Received(1).Send("Deployment failed"); + } + + [Fact] + public void Project_Without_Tests_And_Failing_Build_Without_Email_Notification() + { + _config.SendEmailSummary().Returns(false); + + var project = Project.Builder() + .With(NoTests) + .Deployed(false) + .Build(); + + _pipeline.Run(project); + + _log.LoggedLines + .Should() + .BeEquivalentTo("INFO: No tests", + "ERROR: Deployment failed", + "INFO: Email disabled"); + + _emailer.DidNotReceive().Send(Any()); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Dependencies/IConfig.cs b/exercise/c#/Day07/Day07/CI/Dependencies/IConfig.cs new file mode 100644 index 00000000..249214a7 --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Dependencies/IConfig.cs @@ -0,0 +1,7 @@ +namespace Day07.CI.Dependencies +{ + public interface IConfig + { + bool SendEmailSummary(); + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Dependencies/IEmailer.cs b/exercise/c#/Day07/Day07/CI/Dependencies/IEmailer.cs new file mode 100644 index 00000000..5e762ca3 --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Dependencies/IEmailer.cs @@ -0,0 +1,7 @@ +namespace Day07.CI.Dependencies +{ + public interface IEmailer + { + void Send(string message); + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Dependencies/ILogger.cs b/exercise/c#/Day07/Day07/CI/Dependencies/ILogger.cs new file mode 100644 index 00000000..de813502 --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Dependencies/ILogger.cs @@ -0,0 +1,8 @@ +namespace Day07.CI.Dependencies +{ + public interface ILogger + { + void Info(string message); + void Error(string message); + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Dependencies/Project.cs b/exercise/c#/Day07/Day07/CI/Dependencies/Project.cs new file mode 100644 index 00000000..92c95989 --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Dependencies/Project.cs @@ -0,0 +1,40 @@ +namespace Day07.CI.Dependencies +{ + public class Project + { + private readonly bool _buildsSuccessfully; + private readonly TestStatus _testStatus; + + private Project(bool buildsSuccessfully, TestStatus testStatus) + { + _buildsSuccessfully = buildsSuccessfully; + _testStatus = testStatus; + } + + public static ProjectBuilder Builder() => new(); + + public bool HasTests() => _testStatus != TestStatus.NoTests; + public string RunTests() => _testStatus == TestStatus.PassingTests ? "success" : "failure"; + public string Deploy() => _buildsSuccessfully ? "success" : "failure"; + + public class ProjectBuilder + { + private bool _buildsSuccessfully; + private TestStatus _testStatus; + + public ProjectBuilder With(TestStatus testStatus) + { + _testStatus = testStatus; + return this; + } + + public ProjectBuilder Deployed(bool buildsSuccessfully) + { + _buildsSuccessfully = buildsSuccessfully; + return this; + } + + public Project Build() => new(_buildsSuccessfully, _testStatus); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Dependencies/TestStatus.cs b/exercise/c#/Day07/Day07/CI/Dependencies/TestStatus.cs new file mode 100644 index 00000000..9ec958f2 --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Dependencies/TestStatus.cs @@ -0,0 +1,9 @@ +namespace Day07.CI.Dependencies +{ + public enum TestStatus + { + NoTests, + PassingTests, + FailingTests, + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/CI/Pipeline.cs b/exercise/c#/Day07/Day07/CI/Pipeline.cs new file mode 100644 index 00000000..cb93a9bc --- /dev/null +++ b/exercise/c#/Day07/Day07/CI/Pipeline.cs @@ -0,0 +1,74 @@ +using Day07.CI.Dependencies; + +namespace Day07.CI +{ + public class Pipeline(IConfig config, IEmailer emailer, ILogger log) + { + public void Run(Project project) + { + bool testsPassed; + bool deploySuccessful; + + if (project.HasTests()) + { + if (project.RunTests() == "success") + { + log.Info("Tests passed"); + testsPassed = true; + } + else + { + log.Error("Tests failed"); + testsPassed = false; + } + } + else + { + log.Info("No tests"); + testsPassed = true; + } + + if (testsPassed) + { + if (project.Deploy() == "success") + { + log.Info("Deployment successful"); + deploySuccessful = true; + } + else + { + log.Error("Deployment failed"); + deploySuccessful = false; + } + } + else + { + deploySuccessful = false; + } + + if (config.SendEmailSummary()) + { + log.Info("Sending email"); + if (testsPassed) + { + if (deploySuccessful) + { + emailer.Send("Deployment completed successfully"); + } + else + { + emailer.Send("Deployment failed"); + } + } + else + { + emailer.Send("Tests failed"); + } + } + else + { + log.Info("Email disabled"); + } + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day07/Day07/Day07.csproj b/exercise/c#/Day07/Day07/Day07.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day07/Day07/Day07.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day08/Day08.Tests/Day08.Tests.csproj b/exercise/c#/Day08/Day08.Tests/Day08.Tests.csproj new file mode 100644 index 00000000..fc197b34 --- /dev/null +++ b/exercise/c#/Day08/Day08.Tests/Day08.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day08/Day08/Day08.csproj b/exercise/c#/Day08/Day08/Day08.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day08/Day08/Day08.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day09/Day09.Tests/ClientTests.cs b/exercise/c#/Day09/Day09.Tests/ClientTests.cs new file mode 100644 index 00000000..72f37d15 --- /dev/null +++ b/exercise/c#/Day09/Day09.Tests/ClientTests.cs @@ -0,0 +1,33 @@ +using Day09.Accountability; +using FluentAssertions; +using Xunit; + +namespace Day09.Tests +{ + public class ClientTests + { + private readonly Client _client = new(new Dictionary + { + {"Tenet Deluxe Edition", 45.99}, + {"Inception", 30.50}, + {"The Dark Knight", 30.50}, + {"Interstellar", 23.98} + }); + + [Fact] + public void Client_Should_Return_Statement() + { + var statement = _client.ToStatement(); + + _client.TotalAmount().Should().Be(130.97); + statement.Should().BeEquivalentTo( + """ + Tenet Deluxe Edition for 45.99€ + Inception for 30.5€ + The Dark Knight for 30.5€ + Interstellar for 23.98€ + Total : 130.97€ + """); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day09/Day09.Tests/Day09.Tests.csproj b/exercise/c#/Day09/Day09.Tests/Day09.Tests.csproj new file mode 100644 index 00000000..7b65e13f --- /dev/null +++ b/exercise/c#/Day09/Day09.Tests/Day09.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day09/Day09/Accountability/Client.cs b/exercise/c#/Day09/Day09/Accountability/Client.cs new file mode 100644 index 00000000..11bb9106 --- /dev/null +++ b/exercise/c#/Day09/Day09/Accountability/Client.cs @@ -0,0 +1,27 @@ +using static System.Environment; +using static System.Globalization.CultureInfo; +using static System.String; + +namespace Day09.Accountability +{ + public class Client(IReadOnlyDictionary orderLines) + { + private double _totalAmount; + + public string ToStatement() + => $"{Join( + NewLine, + orderLines + .Select(kvp => FormatLine(kvp.Key, kvp.Value)) + .ToList() + )}{NewLine}Total : {_totalAmount.ToString(InvariantCulture)}€"; + + private string FormatLine(string name, double value) + { + _totalAmount += value; + return name + " for " + value.ToString(InvariantCulture) + "€"; + } + + public double TotalAmount() => _totalAmount; + } +} \ No newline at end of file diff --git a/exercise/c#/Day09/Day09/Day09.csproj b/exercise/c#/Day09/Day09/Day09.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day09/Day09/Day09.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day10/Day10.Tests/Day10.Tests.csproj b/exercise/c#/Day10/Day10.Tests/Day10.Tests.csproj new file mode 100644 index 00000000..0b4ab64b --- /dev/null +++ b/exercise/c#/Day10/Day10.Tests/Day10.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day10/Day10.Tests/FizzBuzzTests.cs b/exercise/c#/Day10/Day10.Tests/FizzBuzzTests.cs new file mode 100644 index 00000000..f519415e --- /dev/null +++ b/exercise/c#/Day10/Day10.Tests/FizzBuzzTests.cs @@ -0,0 +1,35 @@ +using FluentAssertions; +using Xunit; + +namespace Day10.Tests +{ + public class FizzBuzzTests + { + [Theory] + [InlineData(1, "1")] + [InlineData(67, "67")] + [InlineData(82, "82")] + [InlineData(3, "Fizz")] + [InlineData(66, "Fizz")] + [InlineData(99, "Fizz")] + [InlineData(5, "Buzz")] + [InlineData(50, "Buzz")] + [InlineData(85, "Buzz")] + [InlineData(15, "FizzBuzz")] + [InlineData(30, "FizzBuzz")] + [InlineData(45, "FizzBuzz")] + public void Returns_Number_Representation(int input, string expectedResult) + => FizzBuzz.Convert(input) + .Should() + .Be(expectedResult); + + [Theory] + [InlineData(0)] + [InlineData(101)] + [InlineData(-1)] + public void Fails_For_Numbers_Out_Of_Range(int input) + => ((Action) (() => FizzBuzz.Convert(input))) + .Should() + .Throw(); + } +} \ No newline at end of file diff --git a/exercise/c#/Day10/Day10/Day10.csproj b/exercise/c#/Day10/Day10/Day10.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day10/Day10/Day10.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day10/Day10/FizzBuzz.cs b/exercise/c#/Day10/Day10/FizzBuzz.cs new file mode 100644 index 00000000..ca36a517 --- /dev/null +++ b/exercise/c#/Day10/Day10/FizzBuzz.cs @@ -0,0 +1,32 @@ +namespace Day10 +{ + public static class FizzBuzz + { + private const int Min = 0; + private const int Max = 100; + private const int Fizz = 3; + private const int Buzz = 5; + private const int Fizz_Buzz = 15; + + public static string Convert(int input) + => IsOutOfRange(input) + ? throw new OutOfRangeException() + : ConvertSafely(input); + + private static string ConvertSafely(int input) + { + if (Is(Fizz_Buzz, input)) + return "FizzBuzz"; + if (Is(Fizz, input)) + return "Fizz"; + if (Is(Buzz, input)) + return "Buzz"; + + return input.ToString(); + } + + private static bool Is(int divisor, int input) => input % divisor == 0; + + private static bool IsOutOfRange(int input) => input is <= Min or > Max; + } +} \ No newline at end of file diff --git a/exercise/c#/Day10/Day10/OutOfRangeException.cs b/exercise/c#/Day10/Day10/OutOfRangeException.cs new file mode 100644 index 00000000..8710ee85 --- /dev/null +++ b/exercise/c#/Day10/Day10/OutOfRangeException.cs @@ -0,0 +1,6 @@ +namespace Day10 +{ + public sealed class OutOfRangeException : ArgumentException + { + } +} \ No newline at end of file diff --git a/exercise/c#/Day11/Day11.Tests/Day11.Tests.csproj b/exercise/c#/Day11/Day11.Tests/Day11.Tests.csproj new file mode 100644 index 00000000..ec5a01e4 --- /dev/null +++ b/exercise/c#/Day11/Day11.Tests/Day11.Tests.csproj @@ -0,0 +1,32 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day11/Day11.Tests/RomanNumeralsTests.cs b/exercise/c#/Day11/Day11.Tests/RomanNumeralsTests.cs new file mode 100644 index 00000000..6c4ebf6c --- /dev/null +++ b/exercise/c#/Day11/Day11.Tests/RomanNumeralsTests.cs @@ -0,0 +1,47 @@ +using System.Text.RegularExpressions; +using FluentAssertions; +using FluentAssertions.LanguageExt; +using FsCheck; +using FsCheck.Xunit; +using Xunit; + +namespace Day11.Tests +{ + public class RomanNumeralsTests + { + [Theory] + [InlineData(1, "I")] + [InlineData(3, "III")] + [InlineData(4, "IV")] + [InlineData(5, "V")] + [InlineData(10, "X")] + [InlineData(13, "XIII")] + [InlineData(50, "L")] + [InlineData(100, "C")] + [InlineData(500, "D")] + [InlineData(1000, "M")] + [InlineData(2499, "MMCDXCIX")] + public void Generate_Roman_For_Numbers(int number, String expectedRoman) + => number.ToRoman() + .Should() + .BeSome(roman => roman.Should().Be(expectedRoman)); + + private readonly Arbitrary _invalidNumbers = Arb.Default.Int32().Filter(x => x is <= 0 or > 3999); + + [Property] + public void Returns_None_For_Any_Number_Out_Of_Range() + => Prop.ForAll( + _invalidNumbers, + x => x.ToRoman().IsNone + ).QuickCheckThrowOnFailure(); + + [Property] + public void Returns_Only_Valid_Symbols_For_Valid_Numbers() + => Prop.ForAll( + Arb.From(Gen.Choose(1, 3999)), + x => x.ToRoman().Exists(RomanCharactersAreValid) + ).QuickCheckThrowOnFailure(); + + private static bool RomanCharactersAreValid(string input) => Regex.Match(input, "[IVXLCDM]+").Success; + } +} \ No newline at end of file diff --git a/exercise/c#/Day11/Day11/Day11.csproj b/exercise/c#/Day11/Day11/Day11.csproj new file mode 100644 index 00000000..90d299c0 --- /dev/null +++ b/exercise/c#/Day11/Day11/Day11.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/exercise/c#/Day11/Day11/RomanNumerals.cs b/exercise/c#/Day11/Day11/RomanNumerals.cs new file mode 100644 index 00000000..bbc56437 --- /dev/null +++ b/exercise/c#/Day11/Day11/RomanNumerals.cs @@ -0,0 +1,54 @@ +using System.Text; +using LanguageExt; +using static LanguageExt.Option; + +namespace Day11 +{ + public static class RomanNumerals + { + private const int MaxNumber = 3999; + + private static readonly IReadOnlyDictionary IntToNumerals = new Dictionary() + { + {1000, "M"}, + {900, "CM"}, + {500, "D"}, + {400, "CD"}, + {100, "C"}, + {90, "XC"}, + {50, "L"}, + {40, "XL"}, + {10, "X"}, + {9, "IX"}, + {5, "V"}, + {4, "IV"}, + {1, "I"}, + }; + + public static Option ToRoman(this int number) => Convert(number); + + public static Option Convert(int number) + => IsInRange(number) + ? ConvertSafely(number) + : None; + + private static string ConvertSafely(int number) + { + var roman = new StringBuilder(); + var remaining = number; + + foreach (var toRoman in IntToNumerals) + { + while (remaining >= toRoman.Key) + { + roman.Append(toRoman.Value); + remaining -= toRoman.Key; + } + } + + return roman.ToString(); + } + + private static bool IsInRange(int number) => number is > 0 and <= MaxNumber; + } +} \ No newline at end of file diff --git a/exercise/c#/Day12/Day12.Tests/Day12.Tests.csproj b/exercise/c#/Day12/Day12.Tests/Day12.Tests.csproj new file mode 100644 index 00000000..aa6b7764 --- /dev/null +++ b/exercise/c#/Day12/Day12.Tests/Day12.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day12/Day12.Tests/GreeterTests.cs b/exercise/c#/Day12/Day12.Tests/GreeterTests.cs new file mode 100644 index 00000000..67df27da --- /dev/null +++ b/exercise/c#/Day12/Day12.Tests/GreeterTests.cs @@ -0,0 +1,48 @@ +using FluentAssertions; +using Xunit; + +namespace Day12.Tests +{ + public class GreeterTests + { + [Fact] + public void SaysHello() + { + var greeter = new Greeter(); + greeter.Greet().Should().Be("Hello."); + } + + [Fact] + public void SaysHelloFormally() + { + var greeter = new Greeter + { + Formality = "formal" + }; + + greeter.Greet().Should().Be("Good evening, sir."); + } + + [Fact] + public void SaysHelloCasually() + { + var greeter = new Greeter + { + Formality = "casual" + }; + + greeter.Greet().Should().Be("Sup bro?"); + } + + [Fact] + public void SaysHelloIntimately() + { + var greeter = new Greeter + { + Formality = "intimate" + }; + + greeter.Greet().Should().Be("Hello Darling!"); + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day12/Day12/Day12.csproj b/exercise/c#/Day12/Day12/Day12.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day12/Day12/Day12.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day12/Day12/Greeter.cs b/exercise/c#/Day12/Day12/Greeter.cs new file mode 100644 index 00000000..ab125cd0 --- /dev/null +++ b/exercise/c#/Day12/Day12/Greeter.cs @@ -0,0 +1,32 @@ +namespace Day12 +{ + public class Greeter + { + public string? Formality { get; set; } + + public string Greet() + { + if (Formality == null) + { + return "Hello."; + } + + if (Formality == "formal") + { + return "Good evening, sir."; + } + else if (Formality == "casual") + { + return "Sup bro?"; + } + else if (Formality == "intimate") + { + return "Hello Darling!"; + } + else + { + return "Hello."; + } + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day13/Day13.Tests/ArticleTests.cs b/exercise/c#/Day13/Day13.Tests/ArticleTests.cs new file mode 100644 index 00000000..62f8754e --- /dev/null +++ b/exercise/c#/Day13/Day13.Tests/ArticleTests.cs @@ -0,0 +1,54 @@ +using FluentAssertions; +using Xunit; + +namespace Day13.Tests +{ + public class ArticleTests + { + private const string Author = "Pablo Escobar"; + private const string CommentText = "Amazing article !!!"; + + private readonly Article _article = new( + "Lorem Ipsum", + "consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore" + ); + + [Fact] + public void Should_Add_Comment_In_An_Article() + { + _article.AddComment(CommentText, Author); + + _article.Comments + .Should().HaveCount(1) + .And.ContainSingle(comment => comment.Text == CommentText && comment.Author == Author); + } + + [Fact] + public void Should_Add_Comment_In_An_Article_Containing_Already_A_Comment() + { + const string newComment = "Finibus Bonorum et Malorum"; + const string newAuthor = "Al Capone"; + + _article.AddComment(CommentText, Author); + _article.AddComment(newComment, newAuthor); + + _article.Comments.Should().HaveCount(2); + + var lastComment = _article.Comments.Last(); + lastComment.Text.Should().Be(newComment); + lastComment.Author.Should().Be(newAuthor); + } + + public class Fail : ArticleTests + { + [Fact] + public void When_Adding_An_Existing_Comment() + { + _article.AddComment(CommentText, Author); + + var act = () => _article.AddComment(CommentText, Author); + act.Should().Throw(); + } + } + } +} \ No newline at end of file diff --git a/exercise/c#/Day13/Day13.Tests/Day13.Tests.csproj b/exercise/c#/Day13/Day13.Tests/Day13.Tests.csproj new file mode 100644 index 00000000..d48a8ff5 --- /dev/null +++ b/exercise/c#/Day13/Day13.Tests/Day13.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day13/Day13/Blog.cs b/exercise/c#/Day13/Day13/Blog.cs new file mode 100644 index 00000000..e143fdaf --- /dev/null +++ b/exercise/c#/Day13/Day13/Blog.cs @@ -0,0 +1,36 @@ +namespace Day13 +{ + public class Article + { + private readonly string _name; + private readonly string _content; + public List Comments { get; } + + public Article(string name, string content) + { + _name = name; + _content = content; + Comments = new List(); + } + + private void AddComment( + string text, + string author, + DateOnly creationDate) + { + var comment = new Comment(text, author, creationDate); + if (Comments.Contains(comment)) + { + throw new CommentAlreadyExistException(); + } + else Comments.Add(comment); + } + + public void AddComment(string text, string author) + => AddComment(text, author, DateOnly.FromDateTime(DateTime.Now)); + } + + public record Comment(string Text, string Author, DateOnly CreationDate); + + public class CommentAlreadyExistException : ArgumentException; +} \ No newline at end of file diff --git a/exercise/c#/Day13/Day13/Day13.csproj b/exercise/c#/Day13/Day13/Day13.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day13/Day13/Day13.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day14/Day14.Tests/Day14.Tests.csproj b/exercise/c#/Day14/Day14.Tests/Day14.Tests.csproj new file mode 100644 index 00000000..5a545684 --- /dev/null +++ b/exercise/c#/Day14/Day14.Tests/Day14.Tests.csproj @@ -0,0 +1,30 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/exercise/c#/Day14/Day14.Tests/FizzBuzzTests.cs b/exercise/c#/Day14/Day14.Tests/FizzBuzzTests.cs new file mode 100644 index 00000000..54ebdfbf --- /dev/null +++ b/exercise/c#/Day14/Day14.Tests/FizzBuzzTests.cs @@ -0,0 +1,35 @@ +using FluentAssertions; +using Xunit; + +namespace Day14.Tests +{ + public class FizzBuzzTests + { + [Theory] + [InlineData(1, "1")] + [InlineData(67, "67")] + [InlineData(82, "82")] + [InlineData(3, "Fizz")] + [InlineData(66, "Fizz")] + [InlineData(99, "Fizz")] + [InlineData(5, "Buzz")] + [InlineData(50, "Buzz")] + [InlineData(85, "Buzz")] + [InlineData(15, "FizzBuzz")] + [InlineData(30, "FizzBuzz")] + [InlineData(45, "FizzBuzz")] + public void Returns_Number_Representation(int input, string expectedResult) + => FizzBuzz.Convert(input) + .Should() + .Be(expectedResult); + + [Theory] + [InlineData(0)] + [InlineData(101)] + [InlineData(-1)] + public void Fails_For_Numbers_Out_Of_Range(int input) + => ((Action) (() => FizzBuzz.Convert(input))) + .Should() + .Throw(); + } +} \ No newline at end of file diff --git a/exercise/c#/Day14/Day14/Day14.csproj b/exercise/c#/Day14/Day14/Day14.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day14/Day14/Day14.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day14/Day14/FizzBuzz.cs b/exercise/c#/Day14/Day14/FizzBuzz.cs new file mode 100644 index 00000000..5cf6c24e --- /dev/null +++ b/exercise/c#/Day14/Day14/FizzBuzz.cs @@ -0,0 +1,37 @@ +namespace Day14 +{ + public static class FizzBuzz + { + private const int Min = 0; + private const int Max = 100; + private const int Fizz = 3; + private const int Buzz = 5; + private const int Fizz_Buzz = 15; + + private static readonly IReadOnlyDictionary, Func> mapping = + new Dictionary, Func> + { + {i => Is(Fizz_Buzz, i), i => "FizzBuzz"}, + {i => Is(Fizz, i), i => "Fizz"}, + {i => Is(Buzz, i), i => "Buzz"}, + {i => true, i => i.ToString()}, + }; + + public static string Convert(int input) + { + var mappingFunction = mapping + .Where(_ => !IsOutOfRange(input)) + .Where(kvp => kvp.Key(input)) + .Select(kvp => kvp.Value) + .FirstOrDefault(); + + return mappingFunction != null + ? mappingFunction(input) + : throw new OutOfRangeException(); + } + + private static bool Is(int divisor, int input) => input % divisor == 0; + + private static bool IsOutOfRange(int input) => input is <= Min or > Max; + } +} \ No newline at end of file diff --git a/exercise/c#/Day14/Day14/OutOfRangeException.cs b/exercise/c#/Day14/Day14/OutOfRangeException.cs new file mode 100644 index 00000000..a1869caa --- /dev/null +++ b/exercise/c#/Day14/Day14/OutOfRangeException.cs @@ -0,0 +1,6 @@ +namespace Day14 +{ + public sealed class OutOfRangeException : ArgumentException + { + } +} \ No newline at end of file diff --git a/exercise/c#/Day15/Day15.Tests/Day15.Tests.csproj b/exercise/c#/Day15/Day15.Tests/Day15.Tests.csproj new file mode 100644 index 00000000..0200ac1c --- /dev/null +++ b/exercise/c#/Day15/Day15.Tests/Day15.Tests.csproj @@ -0,0 +1,26 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/exercise/c#/Day15/Day15/Day15.csproj b/exercise/c#/Day15/Day15/Day15.csproj new file mode 100644 index 00000000..3a635329 --- /dev/null +++ b/exercise/c#/Day15/Day15/Day15.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/exercise/c#/Day15/Day15/DocumentTemplate.cs b/exercise/c#/Day15/Day15/DocumentTemplate.cs new file mode 100644 index 00000000..0fa9f909 --- /dev/null +++ b/exercise/c#/Day15/Day15/DocumentTemplate.cs @@ -0,0 +1,13 @@ +namespace Day15 +{ + public enum DocumentTemplate + { + DEERPP, + DEERPM, + AUTP, + AUTM, + SPEC, + GLPP, + GLPM + } +} \ No newline at end of file diff --git a/exercise/c#/Day15/Day15/RecordType.cs b/exercise/c#/Day15/Day15/RecordType.cs new file mode 100644 index 00000000..6f0fb9ae --- /dev/null +++ b/exercise/c#/Day15/Day15/RecordType.cs @@ -0,0 +1,9 @@ +namespace Day15 +{ + public enum RecordType + { + IndividualProspect, + LegalProspect, + All + } +} \ No newline at end of file diff --git a/exercise/c#/Day15/Day15/Template.cs b/exercise/c#/Day15/Day15/Template.cs new file mode 100644 index 00000000..afdcb4f6 --- /dev/null +++ b/exercise/c#/Day15/Day15/Template.cs @@ -0,0 +1,40 @@ +namespace Day15 +{ + public record Template( + DocumentTemplate DocumentTemplate, + RecordType RecordType, + string DocumentType) + { + private static IEnumerable