Esempio n. 1
0
            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);
            }
Esempio n. 2
0
            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");
            }