public void LogServerStatisticSetNullNetwork()
        {
            var stat = this.ServerStats();

            stat.NetworkPercentages = null;
            using (var client = new DatumClient())
            {
                client.LogServerStatisticSet(stat);
            }

            var table = new AzureTable <Abc.Services.Data.ServerStatisticsRow>(ServerConfiguration.Default);
            var row   = (from data in table.QueryByPartition(stat.Token.ApplicationId.ToString())
                         where data.MachineName == stat.MachineName
                         select data).First();

            Assert.IsNotNull(row);
            Assert.AreEqual <Guid>(stat.Token.ApplicationId, row.ApplicationId, "Application Id should match");
            Assert.AreEqual <DateTime>(stat.OccurredOn.Date, row.OccurredOn.Date, "Occured On should match");
            Assert.AreEqual <string>(stat.MachineName, row.MachineName, "Machine Name should match");
            Assert.AreEqual <double>(stat.CpuUsagePercentage, row.CpuUsagePercentage);
            Assert.AreEqual <double>(stat.PhysicalDiskUsagePercentage, row.PhysicalDiskUsagePercentage);
            Assert.AreEqual <double>(stat.MemoryUsagePercentage, row.MemoryUsagePercentage);
            Assert.IsNull(stat.NetworkPercentages);
            Assert.IsNull(row.NetworkPercentage1);
            Assert.IsNull(row.NetworkPercentage2);
            Assert.IsNull(row.NetworkPercentage3);
            Assert.IsNull(row.NetworkPercentage4);
        }
 public void LogServerStatisticSetNull()
 {
     using (var client = new DatumClient())
     {
         client.LogServerStatisticSet(null);
     }
 }
 public void LogServerStatisticSetInvalidValidationKey()
 {
     using (var client = new DatumClient())
     {
         var stats = this.ServerStats();
         stats.Token.ValidationKey = StringHelper.NullEmptyWhiteSpace();
         client.LogServerStatisticSet(stats);
     }
 }
 public void LogServerStatisticSetEmptyApplicationId()
 {
     using (var client = new DatumClient())
     {
         var stats = this.ServerStats();
         stats.Token.ApplicationId = Guid.Empty;
         client.LogServerStatisticSet(stats);
     }
 }
 public void LogServerStatisticSetNullToken()
 {
     using (var client = new DatumClient())
     {
         var stats = this.ServerStats();
         stats.Token = null;
         client.LogServerStatisticSet(stats);
     }
 }