public void AllAttributesPropertyDeclaration_test() { // Arrange var setting = new PocoSetting { AddKeyAttribute = true, AddRequiredAttribute = true, AddJsonAttribute = true }; _attributeManager.Init(setting); PropertyTemplate property = new PropertyTemplate { PropName = "CategoryID", PropType = "int", IsKey = true }; // Act var sut = new PropertyGenerator(property, setting); // Assert Assert.IsTrue(sut.ToString().Contains("[Key]") && sut.ToString().Contains("[Required]") && sut.ToString().Contains("[JsonProperty(PropertyName = \"CategoryID\")]")); }