示例#1
0
        public void CreateFieldData_Default_ReturnsIFieldData()
        {
            var factory   = new ChrysalisFactory();
            var fieldData = factory.CreateFieldData("TestFieldData");

            Assert.IsAssignableFrom <IFieldData>(fieldData);
        }
示例#2
0
        public void CreateFieldData_Default_SetsProperties()
        {
            var factory   = new ChrysalisFactory();
            var name      = "TestFieldData";
            var fieldData = factory.CreateFieldData(name);

            Assert.Equal(name, fieldData.Name);
            Assert.Equal(ContentType.None, fieldData.ContentType);
            Assert.Null(fieldData.Path);
        }
示例#3
0
        public void CreateFieldData_ProvideOptionalParameters_SetsProperties()
        {
            var factory     = new ChrysalisFactory();
            var name        = "TestFieldData";
            var contentType = ContentType.Attribute;
            var path        = "TestFieldDataPath";
            var fieldData   = factory.CreateFieldData(name, contentType, path);


            Assert.Equal(name, fieldData.Name);
            Assert.Equal(contentType, fieldData.ContentType);
            Assert.Equal(path, fieldData.Path);
        }