Use correct punctuation for comments.
MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
@@ -35,7 +35,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.Empty(requested[2].BitCommitments);
Assert.Equal(Money.Zero, credentialRequest.DeltaAmount);
- // Issuer part
+ // Issuer part.
var issuer = new CredentialIssuer(sk, numberOfCredentials, rnd);
var credentialResponse = issuer.HandleRequest(credentialRequest);
@@ -56,7 +56,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.NotEmpty(credentialRequested[0].BitCommitments);
Assert.NotEmpty(credentialRequested[1].BitCommitments);
- // Issuer part
+ // Issuer part.
var issuer = new CredentialIssuer(sk, numberOfCredentials, rnd);
var credentialResponse = issuer.HandleRequest(credentialRequest);
@@ -80,7 +80,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.NotEmpty(requested[1].BitCommitments);
Assert.Equal(Money.Zero, credentialRequest.DeltaAmount);
- // Issuer part
+ // Issuer part.
var issuer = new CredentialIssuer(sk, numberOfCredentials, rnd);
var credentialResponse = issuer.HandleRequest(credentialRequest);
@@ -136,11 +136,11 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
var (validCredentialRequest, _) = client.CreateRequest(Array.Empty<Money>(), client.Credentials.ZeroValue.Take(1));
- // Test incorrect number of presentations (one instead of 3)
+ // Test incorrect number of presentations (one instead of 3.)
var presented = validCredentialRequest.Presented.ToArray();
var invalidCredentialRequest = new RegistrationRequestMessage(
validCredentialRequest.DeltaAmount,
- new[] { presented[0] }, // Should present 3 credentials
+ new[] { presented[0] }, // Should present 3 credentials.
validCredentialRequest.Requested,
validCredentialRequest.Proofs);
@@ -148,11 +148,11 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.Equal(WabiSabiErrorCode.InvalidNumberOfPresentedCredentials, ex.ErrorCode);
Assert.Equal("3 credential presentations were expected but 1 were received.", ex.Message);
- // Test incorrect number of presentations (0 instead of 3)
+ // Test incorrect number of presentations (0 instead of 3.)
presented = credentialRequest.Presented.ToArray();
invalidCredentialRequest = new RegistrationRequestMessage(
Money.Coins(2),
- Array.Empty<CredentialPresentation>(), // Should present 3 credentials
+ Array.Empty<CredentialPresentation>(), // Should present 3 credentials.
validCredentialRequest.Requested,
validCredentialRequest.Proofs);
@@ -162,7 +162,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
(validCredentialRequest, _) = client.CreateRequest(Array.Empty<Money>(), client.Credentials.All);
- // Test incorrect number of credential requests
+ // Test incorrect number of credential requests.
invalidCredentialRequest = new RegistrationRequestMessage(
validCredentialRequest.DeltaAmount,
validCredentialRequest.Presented,
@@ -173,7 +173,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.Equal(WabiSabiErrorCode.InvalidNumberOfRequestedCredentials, ex.ErrorCode);
Assert.Equal("3 credential requests were expected but 1 were received.", ex.Message);
- // Test incorrect number of credential requests
+ // Test incorrect number of credential requests.
invalidCredentialRequest = new RegistrationRequestMessage(
Money.Coins(2),
Array.Empty<CredentialPresentation>(),
@@ -184,7 +184,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
Assert.Equal(WabiSabiErrorCode.InvalidNumberOfRequestedCredentials, ex.ErrorCode);
Assert.Equal("3 credential requests were expected but 1 were received.", ex.Message);
- // Test invalid range proof
+ // Test invalid range proof.
var requested = validCredentialRequest.Requested.ToArray();
invalidCredentialRequest = new RegistrationRequestMessage(
@@ -201,7 +201,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
var client = new WabiSabiClient(sk.ComputeCoordinatorParameters(), numberOfCredentials, rnd);
var (validCredentialRequest, validationData) = client.CreateRequestForZeroAmount();
- // Test invalid proofs
+ // Test invalid proofs.
var proofs = validCredentialRequest.Proofs.ToArray();
proofs[0] = proofs[1];
var invalidCredentialRequest = new RegistrationRequestMessage(

MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
@@ -23,7 +23,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
new GroupElementJsonConverter()
};
- // Deserialization invalid elements
+ // Deserialization invalid elements.
var ex = Assert.Throws<ArgumentException>(() => JsonConvert.DeserializeObject<GroupElement>("21", converters));
Assert.StartsWith("No valid serialized GroupElement", ex.Message);
@@ -33,14 +33,14 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
ex = Assert.Throws<ArgumentException>(() => JsonConvert.DeserializeObject<GroupElement>("\"0000000000000000000000000000000000000000000000000000000000000000\"", converters));
Assert.StartsWith("Parameter must be 33. Actual: 32.", ex.Message);
- // Serialization Infinity test
+ // Serialization Infinity test.
var serializedInfinityGroupElement = JsonConvert.SerializeObject(GroupElement.Infinity, converters);
Assert.Equal("\"000000000000000000000000000000000000000000000000000000000000000000\"", serializedInfinityGroupElement);
var deserializedInfinityGroupElement = JsonConvert.DeserializeObject<GroupElement>("\"000000000000000000000000000000000000000000000000000000000000000000\"", converters);
Assert.Equal(GroupElement.Infinity, deserializedInfinityGroupElement);
- // Serialization round test
+ // Serialization round test.
var serializedGroupElement = JsonConvert.SerializeObject(Generators.G, converters);
Assert.Equal("\"0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798\"", serializedGroupElement);
@@ -56,7 +56,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
new GroupElementJsonConverter()
};
- // Serialization collection test
+ // Serialization collection test.
var serializedGroupElements = JsonConvert.SerializeObject(new[] { Generators.Gx0, Generators.Gx1 }, converters);
Assert.Equal("[\"02E33C9F3CBE6388A2D3C3ECB12153DB73499928541905D86AAA4FFC01F2763B54\",\"0246253CC926AAB789BAA278AB9A54EDEF455CA2014038E9F84DE312C05A8121CC\"]", serializedGroupElements);
@@ -76,7 +76,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
new GroupElementJsonConverter()
};
- // Serialization round test
+ // Serialization round test.
var issuanceRequest = new IssuanceRequest(Generators.G, Enumerable.Range(0, 5).Select(i => Generators.FromText($"G{i}")));
var serializedIssuanceRequest = JsonConvert.SerializeObject(issuanceRequest, converters);
@@ -93,20 +93,20 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
new ScalarJsonConverter()
};
- // Deserialization invalid scalar
+ // Deserialization invalid scalar.
var ex = Assert.Throws<ArgumentException>(() => JsonConvert.DeserializeObject<Scalar>("21", converters));
Assert.StartsWith("No valid serialized Scalar", ex.Message);
Assert.Throws<IndexOutOfRangeException>(() => JsonConvert.DeserializeObject<Scalar>("\"\"", converters));
- // Serialization Zero test
+ // Serialization Zero test.
var serializedZero = JsonConvert.SerializeObject(Scalar.Zero, converters);
Assert.Equal("\"0000000000000000000000000000000000000000000000000000000000000000\"", serializedZero);
var deserializedZero = JsonConvert.DeserializeObject<Scalar>("\"0000000000000000000000000000000000000000000000000000000000000000\"", converters);
Assert.Equal(Scalar.Zero, deserializedZero);
- // Serialization round test
+ // Serialization round test.
var scalar = new Scalar(ByteHelpers.FromHex("D9C17A80D299A51E1ED9CF94FCE5FD883ADACE4ECC167E1D1FB8E5C4A0ADC4D2"));
var serializedScalar = JsonConvert.SerializeObject(scalar, converters);
@@ -124,7 +124,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
new ScalarJsonConverter()
};
- // Serialization collection test
+ // Serialization collection test.
var one = Scalar.One;
var two = one + one;
var three = two + one;
@@ -163,13 +163,13 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
var present = client.Credentials.ZeroValue.Take(numberOfCredentials);
(credentialRequest, _) = client.CreateRequest(new[] { Money.Coins(1) }, present);
- // Registration request message
+ // Registration request message.
var serializedRequestMessage = JsonConvert.SerializeObject(credentialRequest, converters);
var deserializedRequestMessage = JsonConvert.DeserializeObject<RegistrationRequestMessage>(serializedRequestMessage, converters);
var reserializedRequestMessage = JsonConvert.SerializeObject(deserializedRequestMessage, converters);
Assert.Equal(serializedRequestMessage, reserializedRequestMessage);
- // Registration response message
+ // Registration response message.
var serializedResponseMessage = JsonConvert.SerializeObject(credentialResponse, converters);
var deserializedResponseMessage = JsonConvert.DeserializeObject<RegistrationResponseMessage>(serializedResponseMessage, converters);
var reserializedResponseMessage = JsonConvert.SerializeObject(deserializedResponseMessage, converters);

Use correct punctuation for comments.