Exemple #1
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);
        }
Exemple #2
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));
        }