コード例 #1
0
 public TMS(string title, Action <long, string> action = null) : base
         (title,
         (t, x) =>
 {
     MSTestLog.WriteLine($"{x} 執行 {t} ms");
 })
 {
 }
コード例 #2
0
 public ESA(string title, Action action = null) : base
         (title,
         () =>
 {
     MSTestLog.WriteLine("離開 Scope 2 執行完畢!");
 })
 {
 }
コード例 #3
0
        public void GetGetPropertys()
        {
            NonPublicClass   npc_ = new NonPublicClass();
            List <NonPublic> pi_  = GetNonPublicValue.GetNonPublicPropertys(npc_);

            pi_.ForEach(x =>
            {
                MSTestLog.WriteLine($"Propertys: name[ {x.npName}] type[ {x.npType.Name}] value[ {x.npObject.ToString()}]");
            });
        }
コード例 #4
0
        public void GetFields()
        {
            NonPublicClass   npc_ = new NonPublicClass();
            List <NonPublic> fs_  = GetNonPublicValue.GetNonPublicFields(npc_);

            fs_.ForEach(x =>
            {
                MSTestLog.WriteLine($"Fields: name[ {x.npName} ] type[ {x.npType.Name} ] value[ {x.npObject.ToString()}]");
            });
        }
コード例 #5
0
ファイル: UnitTest1.cs プロジェクト: sam-liaw/TeamNotify
        public void TestMethodJandiNotify()
        {
            Dictionary <int, string> dicUrl = new Dictionary <int, string>()
            {
                { 1, "https://" }
            };
            JANDI notify_ = new JANDI(dicUrl);

            notify_.Notify($"代刚 Notify:{DateTime.Now.ToString()}", 1, "代刚");

            MSTestLog.WriteLine($"代刚Θ:{DateTime.Now.ToString()}");
        }
コード例 #6
0
        public void TestMethod()
        {
            void exitCallback_()
            {
                MSTestLog.WriteLine("離開 Scope 執行完畢!");
            }

            using (var tms = new ExitScopeAction("離開 Scope 執行", exitCallback_))
            {
                Thread.Sleep(2000);
            }
        }
コード例 #7
0
        public void TestMethod()
        {
            NonPublicClass npc_ = new NonPublicClass();

            string npf_ = GetNonPublicValue.GetFieldValue(npc_, "NonPublicField") as string;

            MSTestLog.WriteLine($"NonPublic Field Value: {npf_}");

            string npp_ = GetNonPublicValue.GetPropertyValue(npc_, "NonPublicProperty") as string;

            MSTestLog.WriteLine($"NonPublic Property Value: {npp_}");
        }
コード例 #8
0
        public void TestMethod()
        {
            void exitTimeMeasure_(long t, string x)
            {
                MSTestLog.WriteLine($"{x} 執行 {t} ms");
            }

            using (var tms = new TimeMeasureScope("for loop", exitTimeMeasure_))
            {
                for (int i = 0; i < 10; ++i)
                {
                    Thread.Sleep(200);
                }
            }
        }
コード例 #9
0
ファイル: UnitTest1.cs プロジェクト: sam-liaw/TeamNotify
 public virtual void Initialize()
 {
     MSTestLog.Initialize();
 }
コード例 #10
0
ファイル: UnitTest.cs プロジェクト: chiisen/ExitScopeAction
 public void TestMethod()
 {
     MSTestLog.WriteLine("³æ¤¸´ú¸Õ");
 }