Example #1
0
 public void GivenKeyDoesNotExistInConstants_WhenGetForIsCalled_ExceptionIsThrown()
 {
     Assert.Throws <KeyNotFoundException>(() => TestableConstant.GetFor("notExistsingKey"));
 }
Example #2
0
 public void GivenKeyIsNull_WhenGetForIsCalled_ExceptionIsThrown()
 {
     Assert.Throws <ArgumentNullException>(() => TestableConstant.GetFor(null));
 }
Example #3
0
        public void GivenKeyDoesExistInConstants_WhenGetForIsCalled_TheConstantIsReturned()
        {
            var constant = TestableConstant.GetFor("constant1");

            Assert.Equal(TestableConstant.Constant1, constant);
        }