Exemplo n.º 1
0
        public void ValidatingEmptyCurrencyFails()
        {
            var sut = new ClassWithCurrencyAttribute()
            {
                Currency = string.Empty
            };

            Assert.IsFalse(sut.IsValid());
        }
Exemplo n.º 2
0
        public void ValidatingCurrencyFails()
        {
            var sut = new ClassWithCurrencyAttribute()
            {
                Currency = "XYZ"
            };

            Assert.IsFalse(sut.IsValid());
        }
Exemplo n.º 3
0
        public void ValidatingNullCurrencyFails()
        {
            var sut = new ClassWithCurrencyAttribute()
            {
                Currency = default(string)
            };

            Assert.IsFalse(sut.IsValid());
        }
Exemplo n.º 4
0
        public void ValidatingCurrencySucceeds()
        {
            var sut = new ClassWithCurrencyAttribute()
            {
                Currency = "EUR"
            };

            Assert.IsTrue(sut.IsValid());
        }