public void Constructor1_ShouldSetMetadataPropertyToReadOnlyDictionary()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws <NotSupportedException>(() =>
            {
                definition.Metadata["Value"] = "Value";
            });
        }
        public void ContractName_WhenNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws <NotImplementedException>(() =>
            {
                var contractName = definition.ContractName;
            });
        }
        public void ToString_WhenContractNameNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws <NotImplementedException>(() =>
            {
                definition.ToString();
            });
        }
Esempio n. 4
0
        public void Constructor1_ShouldSetMetadataPropertyToReadOnlyDictionary()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws<NotSupportedException>(() =>
            {
                definition.Metadata["Value"] = "Value";
            });
        }
        public void ToString_ShouldReturnOverriddenContractNameProperty()
        {
            var expectations = Expectations.GetContractNamesWithEmpty();

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

                Assert.Equal(e, definition.ToString());
            }
        }
        public void Constructor1_ShouldSetMetadataPropertyToEmptyDictionary()
        {
            var definition = new DerivedExportDefinition();

            Assert.Empty(definition.Metadata);
        }
Esempio n. 7
0
        public void Constructor1_ShouldSetMetadataPropertyToEmptyDictionary()
        {
            var definition = new DerivedExportDefinition();

            EnumerableAssert.IsEmpty(definition.Metadata);
        }
Esempio n. 8
0
        public void ToString_ShouldReturnOverriddenContractNameProperty()
        {
            var expectations = Expectations.GetContractNamesWithEmpty();
            
            foreach (var e in expectations)
            {
                var definition = new DerivedExportDefinition(() => e);

                Assert.AreEqual(e, definition.ToString());
            }
        }
Esempio n. 9
0
        public void ToString_WhenContractNameNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws<NotImplementedException>(() =>
            {
                definition.ToString();
            });
        }
Esempio n. 10
0
        public void ContractName_WhenNotOverridden_ShouldThrowNotImplemented()
        {
            var definition = new DerivedExportDefinition();

            ExceptionAssert.Throws<NotImplementedException>(() =>
            {
                var contractName = definition.ContractName;
            });
        }