예제 #1
0
        public void TestValueEquals()
        {
            const string error = "Invalid return from ValueEquals method";

            TestPrecision p = new TestPrecision();

            Assert.IsTrue(this.ValueEquals(p), error);

            p.PrecisionType = Precision.PrecisionTypeCode.Precision;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.PrecisionType = p.PrecisionType;
            Assert.IsTrue(this.ValueEquals(p), error);

            this.FaceValue = false;
            p.FaceValue    = true;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.FaceValue = p.FaceValue;
            Assert.IsTrue(this.ValueEquals(p), error);

            p.NumberOfDigits = 9;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.NumberOfDigits = p.NumberOfDigits;
            Assert.IsTrue(this.ValueEquals(p), error);
        }
예제 #2
0
        public void TestValueEquals()
        {
            const string error = "Invalid return from ValueEquals method";

            TestPrecision p = new TestPrecision();

            Assert.IsTrue(this.ValueEquals(p), error);

            p.PrecisionType = Precision.PrecisionTypeCode.Precision;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.PrecisionType = p.PrecisionType;
            Assert.IsTrue(this.ValueEquals(p), error);

            this.FaceValue = false;
            p.FaceValue = true;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.FaceValue = p.FaceValue;
            Assert.IsTrue(this.ValueEquals(p), error);

            p.NumberOfDigits = 9;
            Assert.IsFalse(this.ValueEquals(p), error);
            this.NumberOfDigits = p.NumberOfDigits;
            Assert.IsTrue(this.ValueEquals(p), error);
        }