You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Baselining these until the next GA as they are not actual compat issues.
2
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory.TopicProperties(System.String, System.Int64, System.Boolean, System.TimeSpan, System.TimeSpan, System.TimeSpan, System.Boolean, Azure.Messaging.ServiceBus.Administration.EntityStatus, System.Boolean)' in the contract but not the implementation.
3
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory.ServiceBusReceivedMessage(System.BinaryData, System.String, System.String, System.String, System.String, System.String, System.TimeSpan, System.String, System.String, System.String, System.String, System.String, System.DateTimeOffset, System.Collections.Generic.IDictionary<System.String, System.Object>, System.Guid, System.Int32, System.DateTimeOffset, System.Int64, System.String, System.Int64, System.DateTimeOffset)' in the contract but not the implementation.
4
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory.RuleProperties(System.String, Azure.Messaging.ServiceBus.Administration.RuleFilter, Azure.Messaging.ServiceBus.Administration.RuleAction)' in the contract but not the implementation.
5
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory.QueueProperties(System.String, System.TimeSpan, System.Int64, System.Boolean, System.Boolean, System.TimeSpan, System.TimeSpan, System.Boolean, System.TimeSpan, System.Int32, System.Boolean, Azure.Messaging.ServiceBus.Administration.EntityStatus, System.String, System.String, System.String, System.Boolean)' in the contract but not the implementation.
6
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory' in the contract but not the implementation.
7
+
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'Azure.Messaging.ServiceBus.ServiceBusModelFactory.SubscriptionProperties(System.String, System.String, System.TimeSpan, System.Boolean, System.TimeSpan, System.TimeSpan, System.Boolean, System.Int32, System.Boolean, Azure.Messaging.ServiceBus.Administration.EntityStatus, System.String, System.String, System.String)' in the contract but not the implementation.
@@ -209,7 +205,6 @@ public static SubscriptionProperties SubscriptionProperties(
209
205
/// <summary>
210
206
/// Creates a new <see cref="RuleProperties"/> instance for mocking.
211
207
/// </summary>
212
-
[EditorBrowsable(EditorBrowsableState.Never)]
213
208
publicstaticRulePropertiesRuleProperties(
214
209
stringname,
215
210
RuleFilterfilter=default,
@@ -218,5 +213,125 @@ public static RuleProperties RuleProperties(
218
213
{
219
214
Action=action
220
215
};
216
+
217
+
/// <summary>
218
+
/// Initializes a new instance of the <see cref="ServiceBusMessageBatch" /> class.
219
+
/// </summary>
220
+
///
221
+
/// <param name="batchSizeBytes">The size, in bytes, that the batch should report; this is a static value and will not mutate as messages are added.</param>
222
+
/// <param name="batchMessageStore">A list to which messages will be added when <see cref="ServiceBusMessageBatch.TryAddMessage" /> calls are successful.</param>
223
+
/// <param name="batchOptions">The set of options to consider when creating this batch.</param>
224
+
/// <param name="tryAddCallback"> A function that will be invoked when <see cref="ServiceBusMessageBatch.TryAddMessage" /> is called;
225
+
/// the return of this callback represents the result of <see cref="ServiceBusMessageBatch.TryAddMessage" />.
226
+
/// If not provided, all events will be accepted into the batch.</param>
227
+
///
228
+
/// <returns>The <see cref="ServiceBusMessageBatch" /> instance that was created.</returns>
Assert.That(()=>batch.TryAddMessage(newServiceBusMessage(newBinaryData("Test"))),Is.True,$"The batch contains {store.Count } events; adding another should be permitted.");
27
+
}
28
+
29
+
Assert.That(store.Count,Is.EqualTo(eventLimit),"The batch should be at its limit.");
30
+
Assert.That(()=>batch.TryAddMessage(newServiceBusMessage(newBinaryData("Too many"))),Is.False,"The batch is full; it should not be possible to add a new event.");
31
+
Assert.That(()=>batch.TryAddMessage(newServiceBusMessage(newBinaryData("Too many"))),Is.False,"The batch is full; a second attempt to add a new event should not succeed.");
32
+
33
+
Assert.That(store.Count,Is.EqualTo(eventLimit),"The batch should be at its limit after the failed TryAdd attempts.");
34
+
Assert.That(batch.AsEnumerable<ServiceBusMessage>(),Is.EquivalentTo(store),"The batch enumerable should reflect the events in the backing store.");
35
+
}
36
+
37
+
/// <summary>
38
+
/// Verifies functionality of the <see cref="EventHubsModelFactory.EventDataBatch" />
0 commit comments