public void RequiresNonNullOrEmptyName()
 {
     ContractAssert.ThrowsArgNullOrEmpty(s => new DiagnosticsService().GetSource(s), "name");
 }
Example #2
0
 public void GivenANullDiagnosticsService_ItShouldThrow()
 {
     ContractAssert.ThrowsArgNull(() => new ContentService(new Mock <IFileStorageService>().Object, null), "diagnosticsService");
 }
Example #3
0
 public void GivenANullOrEmptyName_ItShouldThrow()
 {
     ContractAssert.ThrowsArgNullOrEmpty(s => new TestableContentService().GetContentItemAsync(s, TimeSpan.Zero).Wait(), "name");
 }
Example #4
0
 public void GivenANullOrEmptyExtension_ItShouldThrow()
 {
     ContractAssert.ThrowsArgNullOrEmpty(s => new TestableContentService().GetContentItemAsync("test", null, TimeSpan.Zero).Wait(), "extension");
 }