コード例 #1
0
ファイル: ConstantTests.cs プロジェクト: projecteon/Constant
 public void GivenKeyDoesNotExistInConstants_WhenGetForIsCalled_ExceptionIsThrown()
 {
     Assert.Throws <KeyNotFoundException>(() => TestableConstant.GetFor("notExistsingKey"));
 }
コード例 #2
0
ファイル: ConstantTests.cs プロジェクト: projecteon/Constant
 public void GivenKeyIsNull_WhenGetForIsCalled_ExceptionIsThrown()
 {
     Assert.Throws <ArgumentNullException>(() => TestableConstant.GetFor(null));
 }
コード例 #3
0
ファイル: ConstantTests.cs プロジェクト: projecteon/Constant
        public void GivenKeyDoesExistInConstants_WhenGetForIsCalled_TheConstantIsReturned()
        {
            var constant = TestableConstant.GetFor("constant1");

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