Пример #1
0
        public void Instance_WithConfiguration_TypeSetAsExpected()
        {
            var configuration = A.Dummy <ITwaddleConfiguration>();

            var instance = Twaddle.WithConfiguration(configuration);

            if (instance is Twaddle twaddle)
            {
                twaddle.Configuration.Should().BeSameAs(configuration);
            }
            else
            {
                Assert.Fail();
            }

            Twaddle.WithDefaults.Name.GenerateFirstName();
        }
Пример #2
0
        public void Instance_WithConfiguration_HasDefaultTypes()
        {
            Twaddle.WithConfiguration(null, null, null, null, null, null)
            .Should()
            .BeOfType(typeof(Twaddle));

            var instance = Twaddle.WithDefaults;

            if (instance is Twaddle twaddle)
            {
                twaddle.Configuration.Should().BeOfType(typeof(TwaddleConfiguration));
            }
            else
            {
                Assert.Fail();
            }
        }