예제 #1
0
파일: JailTests.cs 프로젝트: jailsfx/jails
            public void Should_Throw_Exception_If_TypeName_Is_Null()
            {
                // Given
                var fixture = new JailFixture();
                var jail = fixture.CreateJail();

                // When
                var exception = Assert.Throws<ArgumentNullException>(() => jail.Resolve(null));

                // Then
                Assert.AreEqual("typeName", exception.ParamName);
            }
예제 #2
0
파일: JailTests.cs 프로젝트: jailsfx/jails
            public void Should_Call_Host()
            {
                // Given
                var fixture = new JailFixture();
                var jail = fixture.CreateJail();

                // When
                jail.Resolve("Some.Type");

                // Then
                fixture.Host.Received(1).ResolveTarget("Some.Type");
            }