Beispiel #1
0
        public static HostInfoModel GetHostInfo()
        {
            var host = new HostInfoModel {
                Name       = Host.HostName.StoredValues["$host_name"],
                Chassis    = Host.HostName.StoredValues["$host_chassis"],
                Deployment = Host.HostName.StoredValues["$host_deployment"],
                Location   = Host.HostName.StoredValues["$host_location"]
            };

            return(host);
        }
Beispiel #2
0
 public HostInfoModel(HostInfoModel hostInfo)
 {
     if (hostInfo == null)
     {
         return;
     }
     this.IsSelected = hostInfo.IsSelected;
     this.Title = hostInfo.Title;
     this.Target = hostInfo.Target;
     this.RedirectTo = hostInfo.RedirectTo;
     this.IsBlocking = hostInfo.IsBlocking;
 }
        public void Test1(int id, string type, string title, int spaceUsed, int spaceTotal, int revenue, int bug, string text, bool warning)
        {
            var hostInfo = new HostInfoModel(id, type, title, spaceUsed, spaceTotal, revenue, bug, text, warning);

            Assert.AreEqual(hostInfo.Id, id);
            Assert.AreEqual(hostInfo.Type, type);
            Assert.AreEqual(hostInfo.Title, title);
            Assert.AreEqual(hostInfo.SpaceUsed, spaceUsed);
            Assert.AreEqual(hostInfo.SpaceTotal, spaceTotal);
            Assert.AreEqual(hostInfo.Revenue, revenue);
            Assert.AreEqual(hostInfo.Bug, bug);
            Assert.AreEqual(hostInfo.Text, text);
            Assert.AreEqual(hostInfo.Warning, warning);
        }