예제 #1
0
        public void TransactionPrinciplesTest()
        {
            var bp1 = new TransactionPrinciples(1, "nothing", "no", double.MaxValue, double.MinValue);
            var bp2 = bp1.ToJson().FromJson <BasePrinciples>();

            Assert.Equal(bp1, bp2);
            Assert.True(bp1 == bp2);
            Assert.False(bp1 != bp2);
            Assert.True(bp1 != null);
            BasePrinciples bp3 = null;

            Assert.False(bp3 != null);
            Assert.True(bp3 == null);
            bp3 = new TransactionPrinciples(2, "anyting", "yes", double.MaxValue, double.MinValue);
            Assert.False(bp1 == bp3);
            Assert.True(bp1 != bp3);
        }
예제 #2
0
        public void PrinciplesTest()
        {
            var bp1 = new BasePrinciples(1, "nothing", "no");
            var bp2 = bp1.ToJson().FromJson <BasePrinciples>();

            Assert.Equal(bp1, bp2);
            Assert.True(bp1 == bp2);
            Assert.False(bp1 != bp2);
            Assert.True(bp1 != null);
            BasePrinciples bp3 = null;

            Assert.False(bp3 != null);
            Assert.True(bp3 == null);
            bp3 = new BasePrinciples(2, "anyting", "yes");
            Assert.False(bp1 == bp3);
            Assert.True(bp1 != bp3);
        }