Guidelines for contributing to the Service Fabric Services and Actors .NET SDK, including documentation standards, testing patterns, and hierarchical test structure with xUnit.
This skill provides guidelines for contributing to the Microsoft Service Fabric Services and Actors .NET SDK, a framework for building highly-scalable distributed cloud applications.
The Service Fabric .NET SDK contains APIs for:
When writing or modifying code:
1. **Update XML documentation for all public APIs**
- Only generate documentation for public APIs
- Ensure documentation is clear and complete
- Follow existing documentation patterns in the codebase
2. **Skip documentation for internal/private members**
- Focus documentation efforts on the public API surface
The project uses a hierarchical test organization pattern to ensure clarity and organization:
**Pattern Structure:**
```csharp
namespace Microsoft.ServiceFabric.TestedProject
{
public abstract class SystemUnderTestClassTest
{
// Setup common test context
public SystemUnderTestClassTest()
{
// Initialize common resources
}
public sealed class MethodName : SystemUnderTestClassTest
{
[Fact]
public void ShouldDoSomething()
{
// Arrange
// Act
// Assert
}
}
}
}
```
**Key Points:**
1. Create an abstract base class named after the system under test with "Test" suffix
2. Initialize common resources in the base class constructor
3. Create sealed nested classes for each method being tested
4. Use descriptive test method names (e.g., `ShouldDoSomething`)
5. Follow Arrange-Act-Assert pattern in test bodies
**IMPORTANT:** Avoid adding "Tests" suffix to namespaces in test files.
This prevents unnecessary imports and keeps the namespace hierarchy clean.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/service-fabric-net-sdk-development/raw