public async Task LoadForms_should_support_no_forms() { var text = "<Forms/>"; var loader = new FormLoader(); Assert.Empty(await loader.LoadForms(new StringReader(text))); }
public async Task LoadForms_should_throw_meaningful_exception_if_cannot_parse_forms_element() { var text = "<Something/>"; var loader = new FormLoader(); var ex = await Assert.ThrowsAsync <InvalidOperationException>(() => loader.LoadForms(new StringReader(text))); ex.Message.ShouldBe("Expected 'Forms' element, but got 'Something'"); }