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