public void CreateObjTestTheGoodRetrunValueType()
        {
            var test = new PoolModelMapper();

            QarnotSDK.QPool pool          = new QarnotSDK.QPool(FakeSDKConnection.GetFakeConnection(), "name");
            var             returnSetting = test.CreateObj(pool);

            Assert.IsTrue(returnSetting is CommandValues.PoolCommandValue);
        }
        public void CreateObjTestTheGoodRetrunValueType()
        {
            var test = new TaskModelMapper();

            QarnotSDK.QTask task          = new QarnotSDK.QTask(FakeSDKConnection.GetFakeConnection(), "name");
            var             returnSetting = test.CreateObj(task);

            Assert.IsTrue(returnSetting is CommandValues.TaskCommandValue);
        }
Exemplo n.º 3
0
        public void CreateObjTestTheGoodRetrunValueType()
        {
            var test = new BucketModelMapper(new BytesFormatter());

            QarnotSDK.QBucket bucket = new QarnotSDK.QBucket(FakeSDKConnection.GetFakeConnection(), "name", false);
            var returnSetting        = test.CreateObj(bucket);

            Assert.IsTrue(returnSetting is CommandValues.BucketCommandValue);
        }
Exemplo n.º 4
0
        public void CreateObjTestTheGoodRetrunValueType()
        {
            var test = new JobModelMapper();

            QarnotSDK.QJob job           = new QarnotSDK.QJob(FakeSDKConnection.GetFakeConnection(), "name");
            var            returnSetting = test.CreateObj(job);

            Assert.IsTrue(returnSetting is CommandValues.JobCommandValue);
        }
Exemplo n.º 5
0
        public void CreateObjVerifyTheValuesSet()
        {
            var bytesFormat = new BytesFormatter();
            var test        = new BucketModelMapper(new BytesFormatter());

            QarnotSDK.QBucket bucket = new QarnotSDK.QBucket(FakeSDKConnection.GetFakeConnection(), "name", false);
            var returnSetting        = test.CreateObj(bucket) as CommandValues.BucketCommandValue;

            Assert.AreEqual(returnSetting.Shortname, bucket.Shortname);
            Assert.AreEqual(returnSetting.FileCount, bucket.FileCount.ToString());
            Assert.AreEqual(returnSetting.UsedSpaceBytes, bytesFormat.ConvertToHumanReadable(bucket.UsedSpaceBytes));
        }
Exemplo n.º 6
0
        public void CreateObjVerifyTheValuesSet()
        {
            var test = new JobModelMapper();

            QarnotSDK.QJob job           = new QarnotSDK.QJob(FakeSDKConnection.GetFakeConnection(), "name");
            var            returnSetting = test.CreateObj(job) as CommandValues.JobCommandValue;

            Assert.AreEqual(returnSetting.Name, job.Name);
            Assert.AreEqual(returnSetting.Shortname, job.Shortname);
            Assert.AreEqual(returnSetting.Uuid, job.Uuid.ToString());
            Assert.AreEqual(returnSetting.State, job.State);
        }
        public void CreateObjVerifyTheValuesSet()
        {
            var test = new TaskModelMapper();

            QarnotSDK.QTask task          = new QarnotSDK.QTask(FakeSDKConnection.GetFakeConnection(), "name");
            var             returnSetting = test.CreateObj(task) as CommandValues.TaskCommandValue;

            Assert.AreEqual(returnSetting.Name, task.Name);
            Assert.AreEqual(returnSetting.Shortname, task.Shortname);
            Assert.AreEqual(returnSetting.Uuid, task.Uuid.ToString());
            Assert.AreEqual(returnSetting.Profile, task.Profile);
            Assert.AreEqual(returnSetting.State, task.State);
            Assert.AreEqual(returnSetting.InstanceCount, task.InstanceCount);
        }
        public void CreateObjVerifyTheValuesSet()
        {
            var test = new PoolModelMapper();

            QarnotSDK.QPool pool          = new QarnotSDK.QPool(FakeSDKConnection.GetFakeConnection(), "name");
            var             returnSetting = test.CreateObj(pool) as CommandValues.PoolCommandValue;

            Assert.AreEqual(returnSetting.Name, pool.Name);
            Assert.AreEqual(returnSetting.Shortname, pool.Shortname);
            Assert.AreEqual(returnSetting.Uuid, pool.Uuid.ToString());
            Assert.AreEqual(returnSetting.Profile, pool.Profile);
            Assert.AreEqual(returnSetting.State, pool.State);
            Assert.AreEqual(returnSetting.NodeCount, pool.NodeCount);
        }