public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
            };
            var it = new TimeZoneConfiguration(resource);

            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.IsNull(it.Creator);
        }
        public void It_has_a_constructor_that_takes_an_IdmResource()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
                Creator = new Person { DisplayName = "Creator Display Name", ObjectID = "Creator ObjectID"},
            };
            var it = new TimeZoneConfiguration(resource);

            Assert.AreEqual("TimeZoneConfiguration", it.ObjectType);
            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.AreEqual("Creator Display Name", it.Creator.DisplayName);
        }
예제 #3
0
        public void It_has_TimeZone_which_can_be_set_back_to_null()
        {
            // Arrange
            var testTimeZoneConfiguration = new TimeZoneConfiguration { DisplayName = "Test TimeZoneConfiguration" };
            _it.TimeZone = testTimeZoneConfiguration;

            // Act
            _it.TimeZone = null;

            // Assert
            Assert.IsNull(_it.TimeZone);
        }
예제 #4
0
        public void It_can_get_and_set_TimeZone()
        {
            // Act
            var testTimeZoneConfiguration = new TimeZoneConfiguration { DisplayName = "Test TimeZoneConfiguration" };
            _it.TimeZone = testTimeZoneConfiguration;

            // Assert
            Assert.AreEqual(testTimeZoneConfiguration.DisplayName, _it.TimeZone.DisplayName);
        }
 public TimeZoneConfigurationTests()
 {
     _it = new TimeZoneConfiguration();
 }