Example #1
0
        public void AssetMoneyToStringTest()
        {
            OpenAsset.AssetId assetId = new OpenAsset.AssetId("8f316d9a09");
            OpenAsset.AssetMoney assetMoney = new OpenAsset.AssetMoney(assetId, 1);

            String actual = assetMoney.ToString();
            Assert.Equal("1-8f316d9a09", actual);
        }
Example #2
0
        public void AssetMoneyToStringTest()
        {
            var assetId    = new OpenAsset.AssetId("8f316d9a09");
            var assetMoney = new OpenAsset.AssetMoney(assetId, 1);

            String actual = assetMoney.ToString();

            Assert.Equal("1-8f316d9a09", actual);
        }
Example #3
0
        public void AssetMoneyLessThan()
        {
            var assetId         = new OpenAsset.AssetId("8f316d9a09");
            var smallAssetMoney = new OpenAsset.AssetMoney(assetId, 2);
            var largeAssetMoney = new OpenAsset.AssetMoney(assetId, 5);

            Assert.True(smallAssetMoney < largeAssetMoney);
            Assert.False(largeAssetMoney < smallAssetMoney);
        }
Example #4
0
        public void AssetMoneyGreaterThan()
        {
            OpenAsset.AssetId    assetId         = new OpenAsset.AssetId("8f316d9a09");
            OpenAsset.AssetMoney smallAssetMoney = new OpenAsset.AssetMoney(assetId, 2);
            OpenAsset.AssetMoney largeAssetMoney = new OpenAsset.AssetMoney(assetId, 5);

            Assert.True(largeAssetMoney > smallAssetMoney);
            Assert.False(smallAssetMoney > largeAssetMoney);
        }
Example #5
0
        public void AssetMoneyLessThan()
        {
            OpenAsset.AssetId assetId = new OpenAsset.AssetId("8f316d9a09");
            OpenAsset.AssetMoney smallAssetMoney = new OpenAsset.AssetMoney(assetId, 2);
            OpenAsset.AssetMoney largeAssetMoney = new OpenAsset.AssetMoney(assetId, 5);

            Assert.True(smallAssetMoney < largeAssetMoney);
            Assert.False(largeAssetMoney < smallAssetMoney);
        }
Example #6
0
        public void AssetMoneyMultiply()
        {
            var assetId    = new OpenAsset.AssetId("8f316d9a09");
            var assetMoney = new OpenAsset.AssetMoney(assetId, 2);

            OpenAsset.AssetMoney actual = assetMoney * 2;

            Assert.Equal(4, actual.Quantity);

            actual = 2 * assetMoney;
            Assert.Equal(4, actual.Quantity);
        }
Example #7
0
        public void AssetMoneyMultiply()
        {
            OpenAsset.AssetId assetId = new OpenAsset.AssetId("8f316d9a09");
            OpenAsset.AssetMoney assetMoney = new OpenAsset.AssetMoney(assetId, 2);

            OpenAsset.AssetMoney actual = assetMoney * 2;

            Assert.Equal(4, actual.Quantity);

            actual = 2 * assetMoney;
            Assert.Equal(4, actual.Quantity);
        }