/*
* Copyright 2013 Objectos, Fábrica de Software LTDA.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package br.com.objectos.rio;
import static br.com.objectos.way.base.testing.WayMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import org.testng.annotations.Test;
import br.com.objectos.rio.RioConfigMethod;
import br.com.objectos.rio.RioConfigOptions;
import com.google.common.collect.ImmutableList;
/**
* @author marcio.endo@objectos.com.br (Marcio Endo)
*/
@Test
public class RioConfigOptionsTest {
public void parse_get() {
RioConfigOptions options = new RioConfigOptions();
options.keys = ImmutableList.of("user.name");
RioConfigMethod res = options.getOrSet();
assertThat(res, instanceOf(RioConfigMethod.Get.class));
}
public void parse_set() {
RioConfigOptions options = new RioConfigOptions();
options.keys = ImmutableList.of("user.name", "whatever");
RioConfigMethod res = options.getOrSet();
assertThat(res, instanceOf(RioConfigMethod.Set.class));
}
}