//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 ensureNotNull() public virtual void ensureNotNull() { string @string = "string"; try { EnsureUtil.ensureNotNull("string", @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 } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFailEnsureNotNull() public virtual void shouldFailEnsureNotNull() { string @string = null; try { EnsureUtil.ensureNotNull("string", @string); fail("Expected: IllegalArgumentException"); } catch (System.ArgumentException) { // happy path } }