コード例 #1
0
        public void HotspotConfiguration_WhenIsInitializedWithNull_ThrowsException()
        {
            var sut = new HotspotConfiguration(ruleLoaderMock.Object);

            sut.Invoking(x => x.Initialize(null)).Should().Throw <NullReferenceException>();
        }
コード例 #2
0
        public void HotspotConfiguration_WhenIsEnabledWithoutInitialized_ThrowException()
        {
            var sut = new HotspotConfiguration(ruleLoaderMock.Object);

            sut.Invoking(x => x.IsEnabled("")).Should().Throw <InvalidOperationException>().WithMessage("Call Initialize() before calling IsEnabled().");
        }