Ejemplo n.º 1
0
        private void CompareExpectedResult(TableMasterRoleInstanceModel result)
        {
            // Validate response
            Assert.Equal(result.Properties.HealthStatus, HealthStatus.Healthy);

            Assert.Equal(result.Properties.Version, "3/18/2015");

            Assert.Equal(result.Properties.NodeUri, "/subscriptions/EA5E931C-89FB-4A74-8EE5-65B7959882D1/resourceGroups/resourceGroupNameX/providers/Microsoft.Storage.Admin/farms/default/nodes/woss-node-1");
            Assert.Equal(result.Properties.RoleIdentifier, "woss-node-1");

            Assert.Equal((result.Properties.HistoryInfos.Count()), 1);

            var startTime = new DateTime(635779620700757296, DateTimeKind.Utc);
            var endtime   = new DateTime(635779656700757296, DateTimeKind.Utc);
            var history   = result.Properties.HistoryInfos[0];

            Assert.Equal(history.Duration, TimeSpan.FromHours(1));
            Assert.Equal(history.RoleIdentifier, "woss-node-1");
            Assert.Equal(history.StartTime, startTime);
            Assert.Equal(history.EndTime, endtime);
        }
 public TableMasterRoleInstanceResponse(TableMasterRoleInstanceModel resource) : base(resource)
 {
     RoleType = RoleType.TableMaster;
 }
Ejemplo n.º 3
0
        private void CompareExpectedResult(TableMasterRoleInstanceModel result)
        {
            // Validate response 
            Assert.Equal(result.Properties.HealthStatus, HealthStatus.Healthy);

            Assert.Equal(result.Properties.Version, "3/18/2015");

            Assert.Equal(result.Properties.NodeUri, "/subscriptions/EA5E931C-89FB-4A74-8EE5-65B7959882D1/resourceGroups/resourceGroupNameX/providers/Microsoft.Storage.Admin/farms/default/nodes/woss-node-1");
            Assert.Equal(result.Properties.RoleIdentifier, "woss-node-1");

            Assert.Equal((result.Properties.HistoryInfos.Count()), 1);

            var startTime = new DateTime(635779620700757296, DateTimeKind.Utc);
            var endtime = new DateTime(635779656700757296, DateTimeKind.Utc);
            var history = result.Properties.HistoryInfos[0];
            Assert.Equal(history.Duration, TimeSpan.FromHours(1));
            Assert.Equal(history.RoleIdentifier, "woss-node-1");
            Assert.Equal(history.StartTime, startTime);
            Assert.Equal(history.EndTime, endtime);
        }
Ejemplo n.º 4
0
 public TableMasterRoleInstanceResponse(TableMasterRoleInstanceModel resource) : base(resource)
 {
     RoleType = RoleType.TableMaster;
 }