public void GetOrCreateReferenceLinkableFlexiFigureBlocks_CreatesReferenceLinkableFlexiFigureBlocksIfItDoesNotAlreadyExist() { // Arrange var dummyMarkdownDocument = new MarkdownDocument(); FlexiFigureBlockFactory testSubject = CreateFlexiFigureBlockFactory(); // Act List <FlexiFigureBlock> result = testSubject.GetOrCreateReferenceLinkableFlexiFigureBlocks(dummyMarkdownDocument); // Assert Assert.NotNull(result); Assert.Same(result, dummyMarkdownDocument.GetData(FlexiFigureBlockFactory.REFERENCE_LINKABLE_FLEXI_FIGURE_BLOCKS_KEY)); }
public void GetOrCreateReferenceLinkableFlexiFigureBlocks_GetsReferenceLinkableFlexiFigureBlocksIfItAlreadyExists() { // Arrange var dummyReferenceLinkableFlexiFigureBlocks = new List <FlexiFigureBlock>(); var dummyMarkdownDocument = new MarkdownDocument(); dummyMarkdownDocument.SetData(FlexiFigureBlockFactory.REFERENCE_LINKABLE_FLEXI_FIGURE_BLOCKS_KEY, dummyReferenceLinkableFlexiFigureBlocks); FlexiFigureBlockFactory testSubject = CreateFlexiFigureBlockFactory(); // Act List <FlexiFigureBlock> result = testSubject.GetOrCreateReferenceLinkableFlexiFigureBlocks(dummyMarkdownDocument); // Assert Assert.Same(dummyReferenceLinkableFlexiFigureBlocks, result); }