-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from leancodepl/feature/pipe-analyzers
LeanPipe analyzers
- Loading branch information
Showing
24 changed files
with
171 additions
and
393 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using LeanCode.Contracts; | ||
|
||
public class Topic1 : ITopic, IProduceNotification<int> { } | ||
|
||
public class Topic2 : ITopic, IProduceNotification<DateTimeOffset> { } | ||
|
||
public class Topic3 : ITopic, IProduceNotification<Guid> { } | ||
|
||
public class Topic4 : ITopic, IProduceNotification<int[]> { } | ||
|
||
public class Topic5 : ITopic, IProduceNotification<List<int>> { } | ||
|
||
public class Topic6 : ITopic, IProduceNotification<string> { } | ||
|
||
public class Topic7 : ITopic, IProduceNotification<Dictionary<int, string>> { } |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
22 changes: 22 additions & 0 deletions
22
src/LeanCode.ContractsGenerator.Tests/ExampleBased/Analyzers/KnownTypesInTopics.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using LeanCode.ContractsGenerator.Analyzers; | ||
using Xunit; | ||
|
||
namespace LeanCode.ContractsGenerator.Tests.ExampleBased.Analyzers; | ||
|
||
public class KnownTypesInTopics | ||
{ | ||
[Fact] | ||
public void Known_types_are_forbidden_in_topics() | ||
{ | ||
"analyzers/topic_known_types.cs" | ||
.AnalyzeFails() | ||
.WithErrorNumber(7) | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic1") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic2") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic3") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic4") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic5") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic6") | ||
.WithError(AnalyzerCodes.TopicMustProduceInternalType, "Topic7"); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.