Esempio n. 1
0
        public void SlotOptions_Load_FromClientVersion_7_6_6()
        {
            var slotOptions = SlotOptions.Load(TestDataReader.ReadStringBuilder("Client_7_6_6_slot-options.txt"));

            Assert.AreEqual("advanced", slotOptions[Options.ClientType]);
            Assert.AreEqual("0", slotOptions[Options.CUDAIndex]);
            Assert.AreEqual("0", slotOptions[Options.GPUIndex]);
            Assert.AreEqual("1", slotOptions[Options.MachineID]);
            Assert.AreEqual("big", slotOptions[Options.MaxPacketSize]);
            Assert.AreEqual("0", slotOptions[Options.OpenCLIndex]);
            Assert.AreEqual("True", slotOptions[Options.PauseOnStart]);
            Assert.AreEqual("false", slotOptions[Options.Paused]);
        }
Esempio n. 2
0
        public void SlotOptions_Load_FromClientVersion_7_1_43()
        {
            var slotOptions = SlotOptions.Load(TestDataReader.ReadStringBuilder("Client_7_1_43_slot-options.txt"), ObjectLoadOptions.None);

            Assert.AreEqual("normal", slotOptions[Options.ClientType]);
            Assert.AreEqual("GPU", slotOptions["client-subtype"]);
            Assert.AreEqual("1", slotOptions[Options.MachineID]);
            Assert.AreEqual("normal", slotOptions[Options.MaxPacketSize]);
            Assert.AreEqual("idle", slotOptions[Options.CorePriority]);
            Assert.AreEqual("99", slotOptions[Options.NextUnitPercentage]);
            Assert.AreEqual("0", slotOptions["max-units"]);
            Assert.AreEqual("15", slotOptions[Options.Checkpoint]);
            Assert.AreEqual("true", slotOptions[Options.PauseOnStart]);
        }
Esempio n. 3
0
 public void SlotOptions_Load_ReturnsNullWhenJsonTextReaderIsNull()
 {
     Assert.IsNull(SlotOptions.Load((TextReader)null));
 }
Esempio n. 4
0
 public void SlotOptions_Load_ReturnsNullWhenJsonStringBuilderIsNull()
 {
     Assert.IsNull(SlotOptions.Load((StringBuilder)null));
 }
Esempio n. 5
0
 public void SlotOptions_Load_ReturnsNullWhenJsonStringIsNull()
 {
     Assert.IsNull(SlotOptions.Load((string)null));
 }