dev
Révision | adf650ac8f8032e9fffdeccb4421a4bf04e486a0 (tree) |
---|---|
l'heure | 2013-02-08 04:59:36 |
Auteur | Kimura Youichi <kim.upsilon@bucy...> |
Commiter | Kimura Youichi |
TweetThumbnailのテストでNullReferenceExceptionが発生する問題の修正
@@ -22,7 +22,9 @@ | ||
22 | 22 | using System; |
23 | 23 | using System.Collections.Generic; |
24 | 24 | using System.Linq; |
25 | +using System.Runtime.InteropServices; | |
25 | 26 | using System.Text; |
27 | +using NSubstitute; | |
26 | 28 | using NUnit.Framework; |
27 | 29 | using System.Reflection; |
28 | 30 | using System.Windows.Forms; |
@@ -74,6 +76,10 @@ namespace OpenTween | ||
74 | 76 | [TestFixtureSetUp] |
75 | 77 | public void MyCommonSetup() |
76 | 78 | { |
79 | + var mockAssembly = Substitute.For<_Assembly>(); | |
80 | + mockAssembly.GetName().Returns(new AssemblyName("OpenTween")); | |
81 | + MyCommon.EntryAssembly = mockAssembly; | |
82 | + | |
77 | 83 | MyCommon.fileVersion = "1.0.0.0"; |
78 | 84 | } |
79 | 85 |