Skip to content

Commit debcac3

Browse files
author
Sharon Shabtai
committed
ESCP-838 Update the Broker model to include objectCount
1 parent 444238e commit debcac3

File tree

6 files changed

+33
-36
lines changed

6 files changed

+33
-36
lines changed

SpectraLogic.SpectraRioBrokerClient.Test/SpectraRioBrokerClientTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ public void GetBrokerTest()
397397
var broker = client.GetBroker(getBrokerRequest);
398398
Assert.AreEqual("brokerName", broker.BrokerName);
399399
Assert.AreEqual("2018-01-24T19:10:22.819Z[UTC]", broker.CreationDate);
400+
Assert.AreEqual(10, broker.ObjectCount);
400401

401402
mockBuilder.VerifyAll();
402403
mockNetwork.VerifyAll();
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"name": "brokerName",
3-
"creationDate": "2018-01-24T19:10:22.819Z[UTC]"
3+
"creationDate": "2018-01-24T19:10:22.819Z[UTC]",
4+
"objectCount": 10
45
}

SpectraLogic.SpectraRioBrokerClient.Test/TestFiles/GetBrokersResponse

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"brokers": [
33
{
44
"name": "brokerName",
5-
"creationDate": "2018-01-24T19:10:22.819Z[UTC]"
5+
"creationDate": "2018-01-24T19:10:22.819Z[UTC]",
6+
"objectCount": 10
67
},
78
{
89
"name": "brokerName2",
9-
"creationDate": "2018-01-24T19:10:23.819Z[UTC]"
10+
"creationDate": "2018-01-24T19:10:23.819Z[UTC]",
11+
"objectCount": 20
1012
}
1113
]
1214
}

SpectraLogic.SpectraRioBrokerClient/Model/Broker.cs

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,32 @@ namespace SpectraLogic.SpectraRioBrokerClient.Model
2323
/// <seealso cref="SpectraLogic.SpectraRioBrokerClient.Model.IBroker" />
2424
public class Broker : IBroker
2525
{
26-
#region Constructors
26+
#region Private Constructors
2727

2828
[JsonConstructor]
29-
private Broker(string brokerName, string creationDate)
29+
private Broker(string brokerName, string creationDate, long objectCount)
3030
{
3131
BrokerName = brokerName;
3232
CreationDate = creationDate;
33+
ObjectCount = objectCount;
3334
}
3435

35-
#endregion Constructors
36+
#endregion Private Constructors
3637

37-
#region Properties
38+
#region Public Properties
3839

39-
/// <summary>
40-
/// Gets the name of the broker.
41-
/// </summary>
42-
/// <value>
43-
/// The name of the broker.
44-
/// </value>
40+
/// <summary>Gets the name of the broker.</summary>
41+
/// <value>The name of the broker.</value>
4542
[JsonProperty(PropertyName = "name")] public string BrokerName { get; }
4643

47-
/// <summary>
48-
/// Gets the creation date.
49-
/// </summary>
50-
/// <value>
51-
/// The creation date.
52-
/// </value>
44+
/// <summary>Gets the creation date.</summary>
45+
/// <value>The creation date.</value>
5346
[JsonProperty(PropertyName = "creationDate")] public string CreationDate { get; }
5447

55-
#endregion Properties
48+
/// <summary>Gets the object count.</summary>
49+
/// <value>The object count.</value>
50+
[JsonProperty(PropertyName = "objectCount")] public long ObjectCount { get; }
51+
52+
#endregion Public Properties
5653
}
5754
}

SpectraLogic.SpectraRioBrokerClient/Model/IBroker.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,20 @@ namespace SpectraLogic.SpectraRioBrokerClient.Model
2020
/// </summary>
2121
public interface IBroker
2222
{
23-
#region Properties
23+
#region Public Properties
2424

25-
/// <summary>
26-
/// Gets the name of the broker.
27-
/// </summary>
28-
/// <value>
29-
/// The name of the broker.
30-
/// </value>
25+
/// <summary>Gets the name of the broker.</summary>
26+
/// <value>The name of the broker.</value>
3127
string BrokerName { get; }
3228

33-
/// <summary>
34-
/// Gets the creation date.
35-
/// </summary>
36-
/// <value>
37-
/// The creation date.
38-
/// </value>
29+
/// <summary>Gets the creation date.</summary>
30+
/// <value>The creation date.</value>
3931
string CreationDate { get; }
4032

41-
#endregion Properties
33+
/// <summary>Gets the object count.</summary>
34+
/// <value>The object count.</value>
35+
long ObjectCount { get; }
36+
37+
#endregion Public Properties
4238
}
4339
}

SpectraLogic.SpectraRioBrokerClient/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// You can specify all the values or you can default the Build and Revision Numbers
4848
// by using the '*' as shown below:
4949
// [assembly: AssemblyVersion("1.0.*")]
50-
[assembly: AssemblyVersion("1.0.0.595")]
51-
[assembly: AssemblyFileVersion("1.0.0.595")]
50+
[assembly: AssemblyVersion("1.0.0.596")]
51+
[assembly: AssemblyFileVersion("1.0.0.596")]
5252
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
5353
[assembly: InternalsVisibleTo("SpectraLogic.SpectraRioBrokerClient.Test")]

0 commit comments

Comments
 (0)