//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void throwsWhenRecordWithReservedIdIsUpdated() public virtual void ThrowsWhenRecordWithReservedIdIsUpdated() { TheStore store = NewStore(); TheRecord record = NewRecord(IdGeneratorImpl.INTEGER_MINUS_ONE); try { store.UpdateRecord(record); fail("Should have failed"); } catch (Exception e) { assertThat(e, instanceOf(typeof(ReservedIdException))); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void throwsWhenRecordWithNegativeIdIsUpdated() public virtual void ThrowsWhenRecordWithNegativeIdIsUpdated() { TheStore store = NewStore(); TheRecord record = NewRecord(-1); try { store.UpdateRecord(record); fail("Should have failed"); } catch (Exception e) { assertThat(e, instanceOf(typeof(NegativeIdException))); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void throwsWhenRecordWithTooHighIdIsUpdated() public virtual void ThrowsWhenRecordWithTooHighIdIsUpdated() { long maxFormatId = 42; when(_recordFormat.MaxId).thenReturn(maxFormatId); TheStore store = NewStore(); TheRecord record = NewRecord(maxFormatId + 1); try { store.UpdateRecord(record); fail("Should have failed"); } catch (Exception e) { assertThat(e, instanceOf(typeof(IdCapacityExceededException))); } }