PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms 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. using System;
  18. using Microsoft.Practices.Composite.Modularity;
  19. using Microsoft.VisualStudio.TestTools.UnitTesting;
  20. namespace Microsoft.Practices.Composite.Tests.Modularity
  21. {
  22. [TestClass]
  23. public class ModuleInfoFixture
  24. {
  25. [TestMethod]
  26. [ExpectedException(typeof(ArgumentException))]
  27. public void NullAssemblyFileThrows()
  28. {
  29. ModuleInfo moduleInfo = new ModuleInfo(null, "moduleType", "moduleName", true);
  30. }
  31. [TestMethod]
  32. [ExpectedException(typeof(ArgumentException))]
  33. public void EmptyAssemblyFileThrows()
  34. {
  35. ModuleInfo moduleInfo = new ModuleInfo(string.Empty, "moduleType", "moduleName", true);
  36. }
  37. [TestMethod]
  38. [ExpectedException(typeof(ArgumentException))]
  39. public void NullModuleTypeThrows()
  40. {
  41. ModuleInfo moduleInfo = new ModuleInfo("assemblyFile", null, "moduleName", true);
  42. }
  43. [TestMethod]
  44. [ExpectedException(typeof(ArgumentException))]
  45. public void EmptyModuleTypeThrows()
  46. {
  47. ModuleInfo moduleInfo = new ModuleInfo("assemblyFile", string.Empty, "moduleName", true);
  48. }
  49. }
  50. }