コード例 #1
0
 public void ForId_Missing()
 {
     var source = new FakeDateTimeZoneSource.Builder
     {
         CreateZone("x"), CreateZone("y")
     }.Build();
     Assert.Throws<ArgumentException>(() => source.ForId("missing"));
 }
コード例 #2
0
        public void ForId_Missing()
        {
            var source = new FakeDateTimeZoneSource.Builder
            {
                CreateZone("x"), CreateZone("y")
            }.Build();

            Assert.Throws <ArgumentException>(() => source.ForId("missing"));
        }
コード例 #3
0
 public void ForId_Present()
 {
     var zone = CreateZone("x");
     var source = new FakeDateTimeZoneSource.Builder
     {
         // The "right" one and some others
         zone, CreateZone("y"), CreateZone("a"), CreateZone("b")
     }.Build();
     Assert.AreSame(zone, source.ForId("x"));
 }
コード例 #4
0
        public void ForId_Present()
        {
            var zone   = CreateZone("x");
            var source = new FakeDateTimeZoneSource.Builder
            {
                // The "right" one and some others
                zone, CreateZone("y"), CreateZone("a"), CreateZone("b")
            }.Build();

            Assert.AreSame(zone, source.ForId("x"));
        }