コード例 #1
0
ファイル: FuTest.cs プロジェクト: llorch19/lunar-csharp
        public void test8()
        {
            Solar solar = new Solar(2011, 8, 23);
            Lunar lunar = solar.getLunar();
            Fu    fu    = lunar.getFu();

            Assert.IsNull(fu);
        }
コード例 #2
0
ファイル: FuTest.cs プロジェクト: llorch19/lunar-csharp
        public void test3()
        {
            Solar solar = new Solar(2011, 7, 24);
            Lunar lunar = solar.getLunar();
            Fu    fu    = lunar.getFu();

            Assert.AreEqual("中伏", fu.toString(), solar.toYmd());
            Assert.AreEqual("中伏第1天", fu.toFullString(), solar.toYmd());
        }
コード例 #3
0
ファイル: FuTest.cs プロジェクト: llorch19/lunar-csharp
        public void test14()
        {
            Solar solar = new Solar(2020, 8, 24);
            Lunar lunar = solar.getLunar();
            Fu    fu    = lunar.getFu();

            Assert.AreEqual("末伏", fu.toString(), solar.toYmd());
            Assert.AreEqual("末伏第10天", fu.toFullString(), solar.toYmd());
        }
コード例 #4
0
ファイル: FuTest.cs プロジェクト: llorch19/lunar-csharp
        public void test12()
        {
            Solar solar = new Solar(2020, 7, 17);
            Lunar lunar = solar.getLunar();
            Fu    fu    = lunar.getFu();

            Assert.AreEqual("初伏", fu.toString(), solar.toYmd());
            Assert.AreEqual("初伏第2天", fu.toFullString(), solar.toYmd());
        }
コード例 #5
0
        protected override void Because_of()
        {
            var fuEntity = new FuEntity {
                Man = new ManEntity {
                    Chu = new ChuEntity {
                        Prop = _propValue
                    }
                }
            };

            _destination = new[] { fuEntity }.AsQueryable().Project().To <Fu>(null, m => m.Man, m => m.Man.Chu).First();
        }
コード例 #6
0
ファイル: PointInfo.cs プロジェクト: Pircs/NaoMahjong
        public int CompareTo(PointInfo other)
        {
            var basePointComparison = BasePoint.CompareTo(other.BasePoint);

            if (basePointComparison != 0)
            {
                return(basePointComparison);
            }
            var fanComparison = TotalFan.CompareTo(other.TotalFan);

            if (fanComparison != 0)
            {
                return(fanComparison);
            }
            return(Fu.CompareTo(other.Fu));
        }
 protected override void Because_of()
 {
     var fuEntity = new FuEntity { Man = new ManEntity { Chu = new ChuEntity { Prop = _propValue } } };
     _destination = new[] { fuEntity }.AsQueryable().ProjectTo<Fu>(m=>m.Man, m=>m.Man.Chu).First();
 }
コード例 #8
0
        public void TestUsageScenario5()
        {
            ITypeInstanceDictionary dict = new TypeInstanceDictionary();

             IFu fu = new Fu();
             dict.Add<IFu>(fu);

             IFu2 fu2 = new Fu2();
             dict.Add<IFu2>(fu2);

             Assert.IsNotNull(dict.Get<IFu>());
             Assert.IsNotNull(dict.Get<IFu2>());
        }
コード例 #9
0
        public void TestUsageScenario4()
        {
            ITypeInstanceDictionary dict = new TypeInstanceDictionary();

             IFu fu = new Fu();
             dict.Add(fu, InstanceType.Instance1);

             IFu fu2 = new Fu();
             dict.Add(fu2, InstanceType.Instance2);

             Assert.IsNotNull(dict.Get<IFu, InstanceType>(InstanceType.Instance1));
             Assert.IsNotNull(dict.Get<IFu, InstanceType>(InstanceType.Instance2));
        }
コード例 #10
0
        public void TestUsageScenario2()
        {
            ITypeInstanceDictionary dict = new TypeInstanceDictionary();

             IFu fu = new Fu();
             dict.Add(fu, "Fu1");

             IFu fu2 = new Fu();
             dict.Add(fu2, "Fu2");

             Assert.IsNotNull(dict.Get<IFu>("Fu1"));
             Assert.IsNotNull(dict.Get<IFu>("Fu2"));
        }
コード例 #11
0
        public void TestSomeUsageScenario1()
        {
            ITypeInstanceDictionary dict = new TypeInstanceDictionary();

             IFu fu = new Fu();
             dict.Add(fu);
             Assert.IsNotNull(dict.Get<IFu>());

             Fu fu2 = new Fu();
             dict.Add(fu2);
             Assert.IsNotNull(dict.Get<Fu>());
        }