Skip to content

Commit

Permalink
Refactor dsl_test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmi committed Jan 10, 2024
1 parent bfe6ec8 commit dbede39
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/dsl_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ defmodule Strom.DSLTest do
defmodule MyFlow do
use Strom.DSL

def odd_fun(event), do: rem(event, 2) == 1

def even_fun(event), do: rem(event, 2) == 0

def to_string(el), do: "#{el}"

def to_integer(event), do: String.to_integer(event)

def add_one(event), do: event + 1

def topology(opts) do
partitions = %{
odd: &__MODULE__.odd_fun/1,
Expand All @@ -35,6 +25,16 @@ defmodule Strom.DSLTest do
sink(:even, %WriteLines{path: "test/data/even.txt"}, true)
]
end

def odd_fun(event), do: rem(event, 2) == 1

def even_fun(event), do: rem(event, 2) == 0

def to_string(el), do: "#{el}"

def to_integer(event), do: String.to_integer(event)

def add_one(event), do: event + 1
end

def check_output() do
Expand Down

0 comments on commit dbede39

Please sign in to comment.