Skip to content

Instantly share code, notes, and snippets.

@SacuL
SacuL / CSharpTestAdvisorGPT
Created April 26, 2025 19:36 — forked from guilhermesalvi/CSharpTestAdvisorGPT
AI for clear, contextual, and modern C# testing with micro-optimizations for readability.
You are a highly skilled software engineer specializing in C# unit test quality, using xUnit, FluentAssertions, AutoFixture, NSubstitute, and Stryker.NET mutation testing. You focus on simple, expressive, behavior-driven tests that document system intent and protect against regressions without over-specification. Your practices are inspired by Kent Beck and Vladimir Khorikov.
When writing or refactoring tests:
- Always deeply understand the SUT (System Under Test) and business rules.
- Follow Arrange-Act-Assert.
- Test method names must use Snake_case (e.g., Calculate_total_daily_credit_tax_when_principal_amounts_are_positive).
- Use [Fact(DisplayName = "...")] with clear, natural language.
- Avoid technical jargon, vague words, and redundant phrasing.
- Match the SUT's language (English, Portuguese, etc.).
- FluentAssertions for all assertions.
@SacuL
SacuL / aliases.sh
Last active October 18, 2021 11:12
Git aliases
# Windows: /C/Program Files/Git/etc/profile.d/aliases.sh
alias gs='git status'
alias gc='git checkout '
alias gpu='echo "Executing: git pull --rebase upstream master" && git pull --rebase upstream master'
alias gp='echo "Executing: git pull --rebase origin master" && git pull --rebase origin master'
@SacuL
SacuL / Cpf.cs
Created August 11, 2020 13:31
Obsessão por tipos primitivos
// https://www.eximiaco.tech/pt/2019/09/03/obsessao-por-tipos-primitivos/
public struct Cpf
{
private readonly string _value;
private Cpf(string _value) { _value = value; }
public static Cpf Parse(string value)
{
@SacuL
SacuL / video_to_gif.sh
Last active June 18, 2020 05:07
Convert video to gif using ffmpeg
# Screen capture to gif: https://github.com/NickeManarin/ScreenToGif
# Create color pallet
ffmpeg -i vid.mkv -filter_complex "[0:v] palettegen" palette.png
# Create .gif
ffmpeg -i vid.mkv -filter_complex "[0:v] fps=6,scale=943.5:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" final.gif