コード例 #1
0
      public void FillTest4()
      {
         string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_4\\slots.txt");
         var slotCollection = new SlotCollection();
         slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
         Assert.AreEqual(3, slotCollection.Count);

         Assert.AreEqual(0, slotCollection[0].Id);
         Assert.AreEqual("RUNNING", slotCollection[0].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
         Assert.AreEqual("smp:4", slotCollection[0].Description);
         Assert.AreEqual("beta", slotCollection[0].SlotOptions.FahClientType);
         Assert.AreEqual(FahClientType.Beta, slotCollection[0].SlotOptions.FahClientTypeEnum);
         Assert.AreEqual("big", slotCollection[0].SlotOptions.MaxPacketSize);
         Assert.AreEqual(MaxPacketSize.Big, slotCollection[0].SlotOptions.MaxPacketSizeEnum);
         Assert.AreEqual(100, slotCollection[0].SlotOptions.NextUnitPercentage);

         Assert.AreEqual(1, slotCollection[1].Id);
         Assert.AreEqual("RUNNING", slotCollection[1].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
         Assert.AreEqual("gpu:0:\"GT200 [GeForce GTX 260]\"", slotCollection[1].Description);
         Assert.AreEqual("beta", slotCollection[1].SlotOptions.FahClientType);
         Assert.AreEqual(FahClientType.Beta, slotCollection[1].SlotOptions.FahClientTypeEnum);
         Assert.AreEqual("low", slotCollection[1].SlotOptions.CorePriority);
         Assert.AreEqual(CorePriority.Low, slotCollection[1].SlotOptions.CorePriorityEnum);

         Assert.AreEqual(2, slotCollection[2].Id);
         Assert.AreEqual("RUNNING", slotCollection[2].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[2].StatusEnum);
         Assert.AreEqual("gpu:1:\"G92 [GeForce 9800 GTX]\"", slotCollection[2].Description);
         Assert.AreEqual("beta", slotCollection[2].SlotOptions.FahClientType);
         Assert.AreEqual(FahClientType.Beta, slotCollection[2].SlotOptions.FahClientTypeEnum);
         Assert.AreEqual("low", slotCollection[2].SlotOptions.CorePriority);
         Assert.AreEqual(CorePriority.Low, slotCollection[2].SlotOptions.CorePriorityEnum);
      }
コード例 #2
0
        public void FillNotDerivedTest()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_1\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill <SlotNotDerived>(MessageCache.GetNextJsonMessage(ref message));
        }
コード例 #3
0
 public void FillTest3()
 {
    string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_3\\slots.txt");
    var slotCollection = new SlotCollection();
    slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
    Assert.AreEqual(1, slotCollection.Count);
    Assert.AreEqual(0, slotCollection[0].Id);
    Assert.AreEqual("RUNNING", slotCollection[0].Status);
    Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
    Assert.AreEqual("smp:8", slotCollection[0].Description);
 }
コード例 #4
0
 public void FillTest1()
 {
     string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_1\\slots.txt");
      var slotCollection = new SlotCollection();
      slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
      Assert.AreEqual(1, slotCollection.Count);
      Assert.AreEqual(0, slotCollection[0].Id);
      Assert.AreEqual("RUNNING", slotCollection[0].Status);
      Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
      Assert.AreEqual("smp:4", slotCollection[0].Description);
      Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
 }
コード例 #5
0
        public void FillTest3()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_3\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(1, slotCollection.Count);
            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:8", slotCollection[0].Description);
        }
コード例 #6
0
        public void FillTest1()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_1\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
            Assert.AreEqual(1, slotCollection.Count);
            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);
            Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
        }
コード例 #7
0
        public void FillDerivedTest1()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_1\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill <SlotDerived>(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(1, slotCollection.Count);
            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("00", ((SlotDerived)slotCollection[0]).IdString);
            Assert.AreEqual(null, ((SlotDerived)slotCollection[0]).IdBool);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);
            Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
            Assert.AreEqual("true", ((SlotOptionsDerived)slotCollection[0].SlotOptions).PauseOnStartString);
        }
コード例 #8
0
        public void FillTest12()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_12\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(1, slotCollection.Count);

            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("PAUSED", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Paused, slotCollection[0].StatusEnum);
            Assert.AreEqual("cpu:4", slotCollection[0].Description);
            Assert.AreEqual(-1, slotCollection[0].SlotOptions.Cpus);
            Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
            Assert.AreEqual("paused", slotCollection[0].Reason);
        }
コード例 #9
0
        public void FillTest5()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_5\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
            Assert.AreEqual(2, slotCollection.Count);

            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);

            Assert.AreEqual(1, slotCollection[1].Id);
            Assert.AreEqual("RUNNING", slotCollection[1].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
            Assert.AreEqual("gpu:0:\"Radeon HD 5870 (Cypress)\"", slotCollection[1].Description);
        }
コード例 #10
0
        public void FillTest10()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_10\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(2, slotCollection.Count);

            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);
            Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);

            Assert.AreEqual(1, slotCollection[1].Id);
            Assert.AreEqual("RUNNING", slotCollection[1].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
            Assert.AreEqual("gpu:0:\"GT200b [GeForce GTX 285]\"", slotCollection[1].Description);
            Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
        }
コード例 #11
0
        public void FillTest7()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_7\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(2, slotCollection.Count);

            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("FINISHING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Finishing, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);
            Assert.AreEqual("beta", slotCollection[0].SlotOptions.FahClientType);
            Assert.AreEqual(FahClientType.Beta, slotCollection[0].SlotOptions.FahClientTypeEnum);
            Assert.AreEqual("big", slotCollection[0].SlotOptions.MaxPacketSize);
            Assert.AreEqual(MaxPacketSize.Big, slotCollection[0].SlotOptions.MaxPacketSizeEnum);
            Assert.AreEqual(100, slotCollection[0].SlotOptions.NextUnitPercentage);

            Assert.AreEqual(1, slotCollection[1].Id);
            Assert.AreEqual("RUNNING", slotCollection[1].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
            Assert.AreEqual("gpu:0:\"GF106 [GeForce 450 GTS]\"", slotCollection[1].Description);
        }
コード例 #12
0
        public void FillTest4()
        {
            string message        = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_4\\slots.txt");
            var    slotCollection = new SlotCollection();

            slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
            Assert.AreEqual(3, slotCollection.Count);

            Assert.AreEqual(0, slotCollection[0].Id);
            Assert.AreEqual("RUNNING", slotCollection[0].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
            Assert.AreEqual("smp:4", slotCollection[0].Description);
            Assert.AreEqual("beta", slotCollection[0].SlotOptions.FahClientType);
            Assert.AreEqual(FahClientType.Beta, slotCollection[0].SlotOptions.FahClientTypeEnum);
            Assert.AreEqual("big", slotCollection[0].SlotOptions.MaxPacketSize);
            Assert.AreEqual(MaxPacketSize.Big, slotCollection[0].SlotOptions.MaxPacketSizeEnum);
            Assert.AreEqual(100, slotCollection[0].SlotOptions.NextUnitPercentage);

            Assert.AreEqual(1, slotCollection[1].Id);
            Assert.AreEqual("RUNNING", slotCollection[1].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
            Assert.AreEqual("gpu:0:\"GT200 [GeForce GTX 260]\"", slotCollection[1].Description);
            Assert.AreEqual("beta", slotCollection[1].SlotOptions.FahClientType);
            Assert.AreEqual(FahClientType.Beta, slotCollection[1].SlotOptions.FahClientTypeEnum);
            Assert.AreEqual("low", slotCollection[1].SlotOptions.CorePriority);
            Assert.AreEqual(CorePriority.Low, slotCollection[1].SlotOptions.CorePriorityEnum);

            Assert.AreEqual(2, slotCollection[2].Id);
            Assert.AreEqual("RUNNING", slotCollection[2].Status);
            Assert.AreEqual(FahSlotStatus.Running, slotCollection[2].StatusEnum);
            Assert.AreEqual("gpu:1:\"G92 [GeForce 9800 GTX]\"", slotCollection[2].Description);
            Assert.AreEqual("beta", slotCollection[2].SlotOptions.FahClientType);
            Assert.AreEqual(FahClientType.Beta, slotCollection[2].SlotOptions.FahClientTypeEnum);
            Assert.AreEqual("low", slotCollection[2].SlotOptions.CorePriority);
            Assert.AreEqual(CorePriority.Low, slotCollection[2].SlotOptions.CorePriorityEnum);
        }
コード例 #13
0
        public void FillTest5()
        {
            string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_5\\slots.txt");
             var slotCollection = new SlotCollection();
             slotCollection.Fill(MessageCache.GetNextJsonMessage(ref message));
             Assert.AreEqual(2, slotCollection.Count);

             Assert.AreEqual(0, slotCollection[0].Id);
             Assert.AreEqual("RUNNING", slotCollection[0].Status);
             Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
             Assert.AreEqual("smp:4", slotCollection[0].Description);

             Assert.AreEqual(1, slotCollection[1].Id);
             Assert.AreEqual("RUNNING", slotCollection[1].Status);
             Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
             Assert.AreEqual("gpu:0:\"Radeon HD 5870 (Cypress)\"", slotCollection[1].Description);
        }
コード例 #14
0
 public void FillNotDerivedTest()
 {
     string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_1\\slots.txt");
      var slotCollection = new SlotCollection();
      slotCollection.Fill<SlotNotDerived>(MessageCache.GetNextJsonMessage(ref message));
 }
コード例 #15
0
      public void FillTest12()
      {
         string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_12\\slots.txt");
         var slotCollection = new SlotCollection();
         slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
         Assert.AreEqual(1, slotCollection.Count);

         Assert.AreEqual(0, slotCollection[0].Id);
         Assert.AreEqual("PAUSED", slotCollection[0].Status);
         Assert.AreEqual(FahSlotStatus.Paused, slotCollection[0].StatusEnum);
         Assert.AreEqual("cpu:4", slotCollection[0].Description);
         Assert.AreEqual(-1, slotCollection[0].SlotOptions.Cpus);
         Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
         Assert.AreEqual("paused", slotCollection[0].Reason);
      }
コード例 #16
0
      public void FillTest10()
      {
         string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_10\\slots.txt");
         var slotCollection = new SlotCollection();
         slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
         Assert.AreEqual(2, slotCollection.Count);

         Assert.AreEqual(0, slotCollection[0].Id);
         Assert.AreEqual("RUNNING", slotCollection[0].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[0].StatusEnum);
         Assert.AreEqual("smp:4", slotCollection[0].Description);
         Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);

         Assert.AreEqual(1, slotCollection[1].Id);
         Assert.AreEqual("RUNNING", slotCollection[1].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
         Assert.AreEqual("gpu:0:\"GT200b [GeForce GTX 285]\"", slotCollection[1].Description);
         Assert.AreEqual(true, slotCollection[0].SlotOptions.PauseOnStart);
      }
コード例 #17
0
      public void FillTest7()
      {
         string message = File.ReadAllText("..\\..\\..\\TestFiles\\Client_v7_7\\slots.txt");
         var slotCollection = new SlotCollection();
         slotCollection.Fill(JsonMessageConnection.GetNextJsonMessage(ref message));
         Assert.AreEqual(2, slotCollection.Count);

         Assert.AreEqual(0, slotCollection[0].Id);
         Assert.AreEqual("FINISHING", slotCollection[0].Status);
         Assert.AreEqual(FahSlotStatus.Finishing, slotCollection[0].StatusEnum);
         Assert.AreEqual("smp:4", slotCollection[0].Description);
         Assert.AreEqual("beta", slotCollection[0].SlotOptions.FahClientType);
         Assert.AreEqual(FahClientType.Beta, slotCollection[0].SlotOptions.FahClientTypeEnum);
         Assert.AreEqual("big", slotCollection[0].SlotOptions.MaxPacketSize);
         Assert.AreEqual(MaxPacketSize.Big, slotCollection[0].SlotOptions.MaxPacketSizeEnum);
         Assert.AreEqual(100, slotCollection[0].SlotOptions.NextUnitPercentage);

         Assert.AreEqual(1, slotCollection[1].Id);
         Assert.AreEqual("RUNNING", slotCollection[1].Status);
         Assert.AreEqual(FahSlotStatus.Running, slotCollection[1].StatusEnum);
         Assert.AreEqual("gpu:0:\"GF106 [GeForce 450 GTS]\"", slotCollection[1].Description);
      }