Example #1
0
 public void Apply_NullFormat_ThrowsArugmentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         StringFormatter.Apply <object>(new object(), null, null, null);
     },
                                                "format");
 }
Example #2
0
 public void Save_NullStream_ThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         new XResourceFile().Save((Stream)null);
     },
                                                "stream");
 }
Example #3
0
 public void Ctor_Null_ThrowsFormatException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         new FormattingArgumentsCollection(null);
     },
                                                "formatProvider");
 }
Example #4
0
 public void Load_NullFileThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         XResourceFile.Load((FileInfo)null);
     },
                                                "file");
 }
Example #5
0
 public void Apply_NullFormatProvider_ThrowsArugmentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         StringFormatter.Apply(Int32.MinValue, "0", null, null);
     },
                                                "formatProvider");
 }
Example #6
0
 public void Register_TypeNull_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         ThreadDomain.Register(null, null);
     },
                                                "type");
 }
Example #7
0
 public void Save_NullFile_ThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         new XResourceFile().Save((FileInfo)null);
     },
                                                "file");
 }
Example #8
0
 public void Register_ActionNull_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         ThreadDomain.Register(typeof(Int32), null);
     },
                                                "creator");
 }
Example #9
0
 public void Apply_NullTokens_ThrowsArugmentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         StringFormatter.Apply(Int32.MinValue, "0", CultureInfo.InvariantCulture, null);
     },
                                                "tokens");
 }
Example #10
0
 public void Remove_Null_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         ThreadDomain.Current.Remove(null);
     },
                                                "type");
 }
Example #11
0
 public void Load_NullStream_ThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         XResourceFile.Load((Stream)null);
     },
                                                "stream");
 }
Example #12
0
 public void Ctor_NullName_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         new XResourceFileData(null, null);
     },
                                                "name");
 }
 public void Ctor_NullArray_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         new EmailAddressCollection((EmailAddress[])null);
     },
                                                "emails");
 }
Example #14
0
 public void Constructor_SerializationInfoIsNull_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException
         (() =>
     {
         SerializationTest.DeserializeUsingConstructor <Percentage>(null, default(StreamingContext));
     },
         "info");
 }
Example #15
0
 public void Format_NullFormat_ThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         var collection = new FormattingArgumentsCollection();
         collection.Format(null, null);
     }
                                                , "format");
 }
Example #16
0
 public void GetStreamSize_NullDirectoryInfo_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         DirectoryInfo directoryInfo = null;
         directoryInfo.GetStreamSize();
     }
                                                , "directoryInfo");
 }
Example #17
0
 public void GetStreamSize_NullFileInfo_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         FileInfo fileInfo = null;
         fileInfo.GetStreamSize();
     }
                                                , "fileInfo");
 }
Example #18
0
 public void GetStreamSize_NullStream_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         Stream stream = null;
         stream.GetStreamSize();
     }
                                                , "stream");
 }
 public void Constructor_SerializationInfoIsNull_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException
         (() =>
     {
         SerializationTest.DeserializeUsingConstructor <InternationalBankAccountNumber>(null, default(StreamingContext));
     },
         "info");
 }
Example #20
0
 public void Format_NullArugment_ThrowArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         var collection = new FormattingArgumentsCollection();
         collection.Format("Value: '{0}'", null);
     }
                                                , "args");
 }
Example #21
0
 public void Add_NullType_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException(() =>
     {
         var collection = new FormattingArgumentsCollection();
         collection.Add(null, "");
     },
                                                "type");
 }
Example #22
0
 public void GetObjectData_Null_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException
         (() =>
     {
         ISerializable obj = new WildcardPattern("*");
         obj.GetObjectData(null, default(StreamingContext));
     },
         "info");
 }
Example #23
0
 public void GetObjectData_Null_ThrowsArgumentNullException()
 {
     ExceptionAssert.CatchArgumentNullException
         (() =>
     {
         ISerializable obj = TestStruct;
         obj.GetObjectData(null, default(StreamingContext));
     },
         "info");
 }