コード例 #1
0
        public void ToString_WhenContractNameNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws <NotImplementedException>(() =>
            {
                definition.ToString();
            });
        }
コード例 #2
0
        public void ToString_ShouldReturnOverriddenContractNameProperty()
        {
            var expectations = Expectations.GetContractNamesWithEmpty();

            foreach (var e in expectations)
            {
                var definition = new DerivedExportDefinition(() => e);

                Assert.Equal(e, definition.ToString());
            }
        }
コード例 #3
0
        public void ToString_ShouldReturnOverriddenContractNameProperty()
        {
            var expectations = Expectations.GetContractNamesWithEmpty();
            
            foreach (var e in expectations)
            {
                var definition = new DerivedExportDefinition(() => e);

                Assert.AreEqual(e, definition.ToString());
            }
        }
コード例 #4
0
        public void ToString_WhenContractNameNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws<NotImplementedException>(() =>
            {
                definition.ToString();
            });
        }