PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/V1/spikes/AGCompositeApplicationLibrary/AGComposite.Tests/Modularity/ModuleInfoFixture.cs

#
C# | 56 lines | 34 code | 6 blank | 16 comment | 0 complexity | cc12ab58da1022d6f560dca7d186a32f MD5 | raw file
 1//===============================================================================
 2// Microsoft patterns & practices
 3// Composite Application Guidance for Windows Presentation Foundation and Silverlight
 4//===============================================================================
 5// Copyright (c) Microsoft Corporation.  All rights reserved.
 6// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
 7// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
 8// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 9// FITNESS FOR A PARTICULAR PURPOSE.
10//===============================================================================
11// The example companies, organizations, products, domain names,
12// e-mail addresses, logos, people, places, and events depicted
13// herein are fictitious.  No association with any real company,
14// organization, product, domain name, email address, logo, person,
15// places, or events is intended or should be inferred.
16//===============================================================================
17
18
19using System;
20using Microsoft.Practices.Composite.Modularity;
21using Microsoft.VisualStudio.TestTools.UnitTesting;
22
23namespace Microsoft.Practices.Composite.Tests.Modularity
24{
25    [TestClass]
26    public class ModuleInfoFixture
27    {
28        [TestMethod]
29        [ExpectedException(typeof(ArgumentException))]
30        public void NullAssemblyFileThrows()
31        {
32            ModuleInfo moduleInfo = new ModuleInfo(null, "moduleType", "moduleName", true);
33        }
34
35        [TestMethod]
36        [ExpectedException(typeof(ArgumentException))]
37        public void EmptyAssemblyFileThrows()
38        {
39            ModuleInfo moduleInfo = new ModuleInfo(string.Empty, "moduleType", "moduleName", true);
40        }
41
42        [TestMethod]
43        [ExpectedException(typeof(ArgumentException))]
44        public void NullModuleTypeThrows()
45        {
46            ModuleInfo moduleInfo = new ModuleInfo("assemblyFile", null, "moduleName", true);
47        }
48
49        [TestMethod]
50        [ExpectedException(typeof(ArgumentException))]
51        public void EmptyModuleTypeThrows()
52        {
53            ModuleInfo moduleInfo = new ModuleInfo("assemblyFile", string.Empty, "moduleName", true);
54        }
55    }
56}