public void When_EditorAlias_Is_Correct_IsParserFor_Should_Return_True() { // arrange var parser = new GridParser(); // act var result = parser.IsParserFor(Constants.PropertyEditors.Aliases.Grid); // assert Assert.IsTrue(result); }
public void TestIsParserForInValidDataType() { // arrange var dataTypeDefinition = new DataTypeDefinition("foo"); var gridConfigMock = new Mock <IGridConfig>(); var parser = new GridParser(gridConfigMock.Object); // act var result = parser.IsParserFor(dataTypeDefinition); // verify Assert.IsFalse(result); }
public void TestIsParserForValidDataType() { // arrange var dataTypeDefinition = new DataTypeDefinition(global::Umbraco.Core.Constants.PropertyEditors.GridAlias); var gridConfigMock = new Mock <IGridConfig>(); var parser = new GridParser(gridConfigMock.Object); // act var result = parser.IsParserFor(dataTypeDefinition); // verify Assert.IsTrue(result); }