Skip to main content

· 2 min read

One of the problem with NuGet are version .One of the problems with version is that ,in the same sln, inadvertently add 2 NuGets with different versions.

· One min read

It is difficult to find documentation about what packages to add for versioning WebAPI .

· 2 min read

Adding WebAPI is not big deal. But what do you need , for a Good functionality ?

· 3 min read

Now the project syncPowershellObjects is full of interfaces and classes. I need a refactoring - to, at least,separate interfaces from classes/implemented functionalities.

It is easy to create a new project and to add the interfaces ( with a new namespace). Somehow more difficult is to respect the rule : the interfaces must not have other the methods / properties that are not interfaces . This infers generating interfaces from classes ( VS is perfect!).

So now is how it looks( generated with https://www.nuget.org/packages/netpackageanalyzerconsole )

And some major versions that differs already , even if all is targeting 7.0!

Number of packages that differ in major version : 3

1 System.Collections.Immutable

2 System.Reflection.Metadata

3 System.Text.Encoding.CodePages

And here are the results of the tests:

Feature: TestUploadAndRetrieve

In order to sync powershell profile
As an anonymous
I want to send my powershell profile
and retrieve data

Scenario: TestOnePC No Powershell [UseCase002] - Passed (1s 071ms)

    Categories: TestOnePC
Step 1: GIVEN NoPowershellProfile7 IsFound For UserName "Andrei" "TestPCAndrei" - Passed (18ms)
Step 2: WHEN the data is sent - Passed (1s 018ms)
Step 3: THEN the return value should be an URL Ending In UserName "Andrei" "TestPCAndrei" - Passed (2ms)

Scenario: TestOnePC Powershell7 Exists [UseCase001] - Passed (1s 061ms)

    Categories: TestOnePC
Step 1: GIVEN PowershellProfile7 IsFound For UserName "Andrei" "TestPCAndrei" [value: "text"] - Passed (2ms)
Step 2: WHEN the data is sent - Passed (1s 048ms)
Step 3: THEN the return value should be an URL Ending In UserName "Andrei" "TestPCAndrei" With ID - Passed (1ms)

Scenario: TestOnePC Powershell7 Exists RetrieveData [UseCase003] - Passed (1s 031ms)

    Categories: TestOnePC
Step 1: GIVEN PowershellProfile7 IsFound For UserName "Andrei" "TestPCAndrei" [value: "text"] - Passed (<1ms)
Step 2: WHEN the data is sent - Passed (1s 012ms)
Step 3: THEN the return value should be an URL Ending In UserName "Andrei" "TestPCAndrei" With ID - Passed (<1ms)
Step 4: AND Can Retrieve Data [userName: "Andrei"] [pc: "TestPCAndrei"] [pwshNumber: "7"] [retValue: "text"] - Passed (5ms)

· One min read

Before starting writing API, I want to generate data about what I have created - packages, reference , tests .

For tests, I have copied the PlainTextReportFormatter from https://github.com/LightBDD/LightBDD/blob/c07341ea8dc90d5c2dae74650d9bdad848978100/src/LightBDD.Framework/Reporting/Formatters/PlainTextReportFormatter.cs#L19

and

  1. modified a bit ( put # in front of Summary , Scenario , Feature, )
  2. Commented new TextTableRenderer , TextTreeRenderer.Render for later use

And voila!

For analyzing the project I use https://github.com/ignatandrei/PackageAnalyzer .

This will export the package references, the relations between packages, the packages with differences in the major ...

The result is here:

https://ignatandrei.github.io/syncPowershellProfile/docs/category/technical-docs

· One min read

This is another decision - how much code coverage should be and how to obtain it.

For Code Coverage, I have worked until now with

https://github.com/danielpalme/ReportGenerator

that works with XPlat Code Coverage

https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage?tabs=windows

But now I have seen a tool that does it all:

https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html

The xml for configuring is dotnetcover.xml

<CoverageParams>
<ReportType>HTML</ReportType>

<Filters>
<ExcludeFilters>
<FilterEntry>
<ModuleMask>*Tests*</ModuleMask>
</FilterEntry>
<FilterEntry>
<ClassMask>*clsSystem*</ClassMask>
</FilterEntry>
<FilterEntry>
<ClassMask>*recSystem*</ClassMask>
</FilterEntry>
<FilterEntry>
<ClassMask>*StaticToInterface*</ClassMask>
</FilterEntry>
<FilterEntry>
<ClassMask>*TestPlatform*</ClassMask>

</FilterEntry>
<FilterEntry>
<ClassMask>*Refit.Implementation*</ClassMask>

</FilterEntry>
</ExcludeFilters>
</Filters>

</CoverageParams>

And for code coverage, should be at least 80%.

Also, install this .net tools:

{
"version": 1,
"isRoot": true,
"tools": {
"jetbrains.dotcover.globaltool": {
"version": "2023.2.1",
"commands": [
"dotnet-dotcover"
]
},
"run-script": {
"version": "0.5.0",
"commands": [
"r"
]
},
"powershell": {
"version": "7.3.6",
"commands": [
"pwsh"
]
}
}
}

And to run this is the global.json

{
"scripts": {
"build": "dotnet build --configuration Release",
"test": "dotnet dotnet-dotcover test --dcXml=dotnetcover.xml",
"ci": "dotnet r build && dotnet r test"
}
}

Also, need saving this

· 2 min read

Since the powershell file profile can exists or not , we need a new UseCase

First , rename use cases from 003 to 030 - to let space for others.

So a new

· One min read

I have started documentation about how to use, put the ADR and UseCases in their own folder, modified links, added about.

· One min read

For starting tests there is a plethora of frameworks. What we want is to

· One min read

I want to have a simple application , without fuss. It will be an WebAPI Application, a Database and a SPA app.

Modifications : Added also use case 4, the list of users Added also max dimension for files Refactored useCases to their folder

Here it comes the ADR :

· One min read

I want to describe the application in detail - so what's best than a use case ?

· One min read

I want the project start with documentation - too many times I wrote the code without documentation.

So I am ready for the first decision - what documentation engine to use.

· 2 min read

Because I am moving from PC to PC and I use powershell ( ok , windows terminal ) I decide to have the $profile synchronized easy What I need is :

· One min read
Sébastien Lorber
Yangshun Tay

Docusaurus blogging features are powered by the blog plugin.

Simply add Markdown files (or folders) to the blog directory.

Regular blog authors can be added to authors.yml.

The blog post date can be extracted from filenames, such as:

  • 2019-05-30-welcome.md
  • 2019-05-30-welcome/index.md

A blog post folder can be convenient to co-locate blog post images:

Docusaurus Plushie

The blog supports tags as well!

And if you don't want a blog: just delete this directory, and use blog: false in your Docusaurus config.

· One min read
Gao Wei

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet