Skip to content

Commit

Permalink
Update Readme & project properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MojtabaKiani committed Jan 2, 2021
1 parent 0f2a6f4 commit 74eee3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ var client = new UdpClient();
client.Connect(IPAddress.Parse("127.0.0.1"), 5000);
```

You can use `server.Mock` to manage Send/Receive data, then server will return configured data, based on sent data:
You can use `mockServer.Mock` to manage Send/Receive data, then server will return configured data, based on sent data:
```csharp
mockServer.Mock.Send("Test String").Receive("Test Response");
mockServer.Mock.Send(new byte[] { 1, 2, 3 }).Receive(new byte[] { 3, 2, 1 });
mockServer.Mock.Send("abcd").Receive(x=> x.ToUpper());
```

An important option in using `mockServer.Mock` is adding anything request to it, then it will reply to any unconfigured request base on this config, you can config
server for this option by using an empty string in `Send` method, just like below :
```csharp
mockServer.Mock.Send("").Receive("Test Response");
```
You can use `mockServer.Mock` either before or after `mockServer.Run()`. For more details please check Test projects.

## Compile
Expand Down
2 changes: 1 addition & 1 deletion src/Rony/Rony.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RepositoryUrl>https://github.com/MojtabaKiani/Rony.Net</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>csharp;mock;mock-server;tcp-mock-server;udp-mock-server;ssl;tcp;udp;xunit;unit-testing;functional-testing;clean-code;clean-architecture</PackageTags>
<PackageReleaseNotes>First release including TCP Server, TCP Server with SSL/TLS support &amp; UDP Server</PackageReleaseNotes>
<PackageReleaseNotes>Changed server loginc for adding any request feature to it, and solve some minor bugs</PackageReleaseNotes>
<NeutralLanguage>en</NeutralLanguage>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
Expand Down

0 comments on commit 74eee3b

Please sign in to comment.