示例#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]);
        }
示例#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]);
        }
示例#3
0
 public void SlotOptions_Load_ReturnsNullWhenJsonTextReaderIsNull()
 {
     Assert.IsNull(SlotOptions.Load((TextReader)null));
 }
示例#4
0
 public void SlotOptions_Load_ReturnsNullWhenJsonStringBuilderIsNull()
 {
     Assert.IsNull(SlotOptions.Load((StringBuilder)null));
 }
示例#5
0
 public void SlotOptions_Load_ReturnsNullWhenJsonStringIsNull()
 {
     Assert.IsNull(SlotOptions.Load((string)null));
 }