f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/test/java/io/protobase/f7/formulas/math/PITest.java
-rw-r--r--
498
 1package io.protobase.f7.formulas.math;
 2
 3import io.protobase.f7.errors.NAException;
 4import io.protobase.f7.testutils.TestFormula;
 5import org.junit.Test;
 6
 7import static com.google.common.truth.Truth.assertThat;
 8
 9public class PITest extends TestFormula {
10
11  @Test
12  public void testApply() {
13    assertThat(PI.SELF.apply(null)).isEqualTo(Math.PI);
14  }
15
16  @Test
17  public void testApply_errorFromArgumentsMismatch() {
18    assertThat(RAND.SELF.apply(null, "Too many")).isEqualTo(new NAException());
19  }
20}