View .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create new PR and open it | |
function pr() { | |
github_url=`git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's%\.git$%%' | awk '/github/'`; | |
branch_name=`git symbolic-ref HEAD | cut -d"/" -f 3,4`; | |
main_branch=`git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4` | |
open_or_start='open' | |
uname=$(uname) | |
if [[ "$uname" == CYGWIN* || "$uname" == MINGW* ]] ; then | |
open_or_start='start' | |
fi |
View Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.Services.AddScoped<IRegisterAccountService, RegisterAccountService>(); | |
builder.Services.AddScoped<IRazorViewToStringRenderer, RazorViewToStringRenderer>(); |
View FluentAssertions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result.Should().Be(2); |
View xUnitAssertions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assert.Equal(2, result); |
View RegisterAccountService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MailKit.Net.Smtp; | |
using MimeKit; | |
using MimeKit.Text; | |
using RazorHtmlEmails.RazorClassLib.Services; | |
using RazorHtmlEmails.RazorClassLib.Views.Emails.ConfirmAccount; | |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace RazorHtmlEmails.Common; |
View CalculatorServiceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void AddShouldSumNumbers() | |
{ | |
var result = CalculatorService.Add(1, 1); | |
result.Should().Be(3); | |
} |
View CalculatorServiceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void AddShouldSumNumbers() | |
{ | |
var result = CalculatorService.Add(1, 1); | |
Assert.Equal(3, result); | |
} |
View CalculatorServiceTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void AddShouldSumNumbers() | |
{ | |
var result = CalculatorService.Add(1, 1); | |
Assert.True(result == 3); | |
} |
View WorkerService.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk.Worker"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | |
</ItemGroup> |
View CounterTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CounterTests : TestContext | |
{ | |
[Fact] | |
public void ShouldIncrementCountWhenButtonIsClicked() | |
{ | |
var counterComponent = RenderComponent<Counter>(); | |
counterComponent.Find("button").Click(); | |
// Asserts actual user behavior |
NewerOlder