//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void ensureParameterInstanceOfClass() public virtual void ensureParameterInstanceOfClass() { object @string = "string"; try { assertThat(EnsureUtil.ensureParamInstanceOf("string", @string, typeof(string))).isInstanceOf(typeof(string)); } catch (System.ArgumentException e) { fail("Not expected the following exception: ", e); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFailEnsureParameterInstanceOfClass() public virtual void shouldFailEnsureParameterInstanceOfClass() { object @string = "string"; try { EnsureUtil.ensureParamInstanceOf("string", @string, typeof(Integer)); fail("Expected: IllegalArgumentException"); } catch (System.ArgumentException) { // happy path } }