Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NetSdrClientApp/Messages/NetSdrMessageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public static class NetSdrMessageHelper
private const short _msgControlItemLength = 2; //2 byte, 16 bit
private const short _msgSequenceNumberLength = 2; //2 byte, 16 bit



public enum MsgTypes
{
SetControlItem,
Expand Down
24 changes: 24 additions & 0 deletions NetSdrClientAppTests/ArchitectureTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using NetArchTest.Rules;
using NUnit.Framework;
using NetSdrClientApp.Networking;

namespace NetSdrClientAppTests
{
public class ArchitectureTests
{
[Test]
public void Messages_ShouldNotDependOn_Networking()
{
// Arrange
var result = Types.InAssembly(typeof(TcpClientWrapper).Assembly)
.That()
.ResideInNamespace("NetSdrClientApp.Messages")
.ShouldNot()
.HaveDependencyOn("NetSdrClientApp.Networking")
.GetResult();

// Assert
Assert.That(result.IsSuccessful, Is.True, "Messages namespace has a prohibited dependency on Networking.");
}
}
}
1 change: 1 addition & 0 deletions NetSdrClientAppTests/NetSdrClientAppTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NetArchTest.Rules" Version="1.3.2" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,35 @@ https://github.com/friezze/ReengineeringCourse/commit/2534516c319a38d4aecd5d70a4
Може здатися дивним що їх стало більше але скоріше за все це тому що пофіксився білдер через зміни в які я лив в мейн і мерджив в гілку але сонар аналізував пуши в мейн а тік злиття. Але у будьякому випадку 8 фіксед.

# 3
До а якщо бути точним одразу після включення ковередж
![alt text](image-5.png)
Після(пушу тестів нових)
![alt text](image-6.png)

# 4
До

![alt text](image-4.png)
Після

Після

![alt text](image-7.png)

Важливо зауважити що завдяки зменьшенню дублікатів піднявся і тест коверед бо коду стало банально меньше

![alt text](image-8.png)

# 5

Це так виглядає після додання порушення прав архітектури і самого порушення.
![alt text](image-9.png)


![alt text](image-10.png)

Після виправлення

![alt text](image-11.png)



Expand Down
Binary file added image-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading