Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.ComponentModel.Composition/Tests/ComponentModelUnitTest/System/ComponentModel/Composition/ImportAttributeTests.cs')
-rw-r--r--mcs/class/System.ComponentModel.Composition/Tests/ComponentModelUnitTest/System/ComponentModel/Composition/ImportAttributeTests.cs139
1 files changed, 0 insertions, 139 deletions
diff --git a/mcs/class/System.ComponentModel.Composition/Tests/ComponentModelUnitTest/System/ComponentModel/Composition/ImportAttributeTests.cs b/mcs/class/System.ComponentModel.Composition/Tests/ComponentModelUnitTest/System/ComponentModel/Composition/ImportAttributeTests.cs
deleted file mode 100644
index 2a4f46772f3..00000000000
--- a/mcs/class/System.ComponentModel.Composition/Tests/ComponentModelUnitTest/System/ComponentModel/Composition/ImportAttributeTests.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.ComponentModel.Composition;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.UnitTesting;
-
-namespace System.ComponentModel.Composition
-{
- [TestClass]
- public class ImportAttributeTests
- {
- [TestMethod]
- public void Constructor1_ShouldSetContractNamePropertyToEmptyString()
- {
- var attribute = new ImportAttribute();
-
- Assert.IsNull(attribute.ContractName);
- Assert.IsNull(attribute.ContractType);
- }
-
- [TestMethod]
- public void Constructor2_NullAsContractNameArgument_ShouldSetContractNamePropertyToEmptyString()
- {
- var attribute = new ImportAttribute((string)null);
-
- Assert.IsNull(attribute.ContractName);
- Assert.IsNull(attribute.ContractType);
- }
-
- [TestMethod]
- public void Constructor3_NullAsContractTypeArgument_ShouldSetContractNamePropertyToEmptyString()
- {
- var attribute = new ImportAttribute((Type)null);
-
- Assert.IsNull(attribute.ContractName);
- Assert.IsNull(attribute.ContractType);
- }
-
- [TestMethod]
- public void Constructor4_NullAsContractTypeArgument_ShouldSetContractNamePropertyToEmptyString()
- {
- var attribute = new ImportAttribute((string)null, (Type)null);
-
- Assert.IsNull(attribute.ContractName);
- Assert.IsNull(attribute.ContractType);
- }
-
- [TestMethod]
- public void Constructor2_ValueAsContractNameArgument_ShouldSetContractNameProperty()
- {
- var expectations = Expectations.GetContractNamesWithEmpty();
-
- foreach (var e in expectations)
- {
- var attribute = new ImportAttribute(e);
-
- Assert.AreEqual(e, attribute.ContractName);
- }
- }
-
- [TestMethod]
- public void Constructor1_ShouldSetAllowDefaultPropertyToFalse()
- {
- var attribute = new ImportAttribute();
-
- Assert.IsFalse(attribute.AllowDefault);
- }
-
- [TestMethod]
- public void Constructor2_ShouldSetAllowDefaultPropertyToFalse()
- {
- var attribute = new ImportAttribute("ContractName");
-
- Assert.IsFalse(attribute.AllowDefault);
- }
-
- [TestMethod]
- public void Constructor3_ShouldSetAllowDefaultPropertyToFalse()
- {
- var attribute = new ImportAttribute(typeof(String));
-
- Assert.IsFalse(attribute.AllowDefault);
- }
-
- [TestMethod]
- public void Constructor1_ShouldSetAllowRecompositionPropertyToFalse()
- {
- var attribute = new ImportAttribute();
-
- Assert.IsFalse(attribute.AllowRecomposition);
- }
-
- [TestMethod]
- public void Constructor2_ShouldSetAllowRecompositionPropertyToFalse()
- {
- var attribute = new ImportAttribute("ContractName");
-
- Assert.IsFalse(attribute.AllowRecomposition);
- }
-
- [TestMethod]
- public void Constructor3_ShouldSetAllowRecompositionPropertyToFalse()
- {
- var attribute = new ImportAttribute(typeof(String));
-
- Assert.IsFalse(attribute.AllowRecomposition);
- }
-
- [TestMethod]
- public void AllowDefault_ValueAsValueArgument_ShouldSetProperty()
- {
- var expectations = Expectations.GetBooleans();
-
- var attribute = new ImportAttribute();
-
- foreach (var e in expectations)
- {
- attribute.AllowDefault = e;
- Assert.AreEqual(e, attribute.AllowDefault);
- }
- }
-
- [TestMethod]
- public void AllowRecomposition_ValueAsValueArgument_ShouldSetProperty()
- {
- var expectations = Expectations.GetBooleans();
-
- var attribute = new ImportAttribute();
-
- foreach (var e in expectations)
- {
- attribute.AllowRecomposition = e;
- Assert.AreEqual(e, attribute.AllowRecomposition);
- }
- }
- }
-}