Skip to content

kozikoff/pptx-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPTX Test

PowerPoint testing library

Make sure your code always generates correct and valid PPTX files (from PowerPoint 2007 version and later)!

How to use

Just add assertThat from Hamcrest and enjoy ))

import PPTX;
import org.junit.jupiter.api.Test;

import java.io.IOException;

import static PPTX.containsText;
import static org.hamcrest.MatcherAssert.assertThat;

public class ContainsTextTests {

    @Test
    void canAssertThatPptxContainsText() throws IOException {
        PPTX pptx = new PPTX(getClass().getClassLoader().getResource("TestPPTX.pptx"));
        assertThat(pptx, containsText("lacinia nisi. Ut ac dolor vitae odio"));
        assertThat(pptx, containsText("My pretty chart"));
        assertThat(pptx, containsText("37.12%"));
        assertThat(pptx, containsText("Beehive State (official), The Mormon State"));
    }
}

How to add

Just copy jar-file into lib directory of your project and make import in IntelliJ IDEA (Project structure - Modules - Dependencies). If you use Gradle, please add the following dependency to build.gradle:

dependencies {
    testImplementation files('lib/pptx-test.jar')
}

Thanks

Many thanks to Andrei Solntsev and his project xls-test for the inspiration.

License

pptx-test is open-source project and distributed under MIT license

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages