- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 885 for Arrange (0.04 sec)
-
src/test/java/jcifs/smb/FileEntryTest.java
void mock_noInteractions() { // Arrange/Act: do nothing // Assert: verify no interactions verifyNoInteractions(mockEntry); } // --- Fake implementation tests (happy path and edge cases) --- @Test @DisplayName("Fake implementation returns provided values (happy path)") void fakeImplementation_happyPath() { // Arrange
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeConnectionTraceTest.java
// Arrange CIFSContext ctx = mock(CIFSContext.class); SmbTreeConnectionTrace trace = new SmbTreeConnectionTrace(ctx); // Act & Assert assertEquals(-1L, trace.getTreeId()); } @Test @DisplayName("getConfig(): delegates to context") void getConfig_delegatesToContext() { // Arrange
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.7K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/LsaPolicyHandleTest.java
void setUp() { // MockitoAnnotations.openMocks(this); // Not needed with @ExtendWith(MockitoExtension.class) } @Test void constructor_shouldOpenPolicySuccessfully() throws IOException { // Arrange String server = "testServer"; int access = 123; // Mock the behavior of sendrecv for MsrpcLsarOpenPolicy2 doAnswer(invocation -> {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java
when(tree.acquire()).thenReturn(tree); } @Test @DisplayName("Getters return constructor values and acquire is called") void gettersAndAcquire() throws Exception { // Arrange stubAcquireReturnsSelf(); String wildcard = "*.*"; int attrs = 123; FileEntry initial = entry("first"); List<FileEntry[]> pages = List.of(new FileEntry[][] { new FileEntry[] {} });
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/dcerpc/msrpc/LsaPolicyHandleTest.java
@BeforeEach void setUp() { // Setup is handled by MockitoExtension } @Test void constructor_shouldOpenPolicySuccessfully() throws IOException { // Arrange String server = "testServer"; int access = 123; // Mock the behavior of sendrecv for MsrpcLsarOpenPolicy2 doAnswer(invocation -> {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.2K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/SamrDomainHandleTest.java
closeHandleCaptor = ArgumentCaptor.forClass(MsrpcSamrCloseHandle.class); } @Test void constructor_shouldOpenDomainSuccessfully() throws IOException { // Arrange int access = 0x01; // Example access value // Simulate successful RPC call doAnswer(invocation -> { MsrpcSamrOpenDomain rpc = invocation.getArgument(0);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbUnsupportedOperationExceptionTest.java
} @Test @DisplayName("Default constructor sets the expected message and no cause") void defaultConstructor_setsExpectedMessage_andNoCause() { // Arrange & Act SmbUnsupportedOperationException ex = new SmbUnsupportedOperationException(); // Assert assertEquals("Operation is not supported with the negotiated capabilities", ex.getMessage(),
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbBasicFileInfoTest.java
public long getSize() { return size; } } // --- Happy path: direct values are returned as provided --- @Test void returnsProvidedValues_happyPath() { // Arrange SmbBasicFileInfo info = new TestInfo(0x20 /* ARCHIVE */, 1_600_000_000_000L, 1_700_000_000_000L, 1_650_000_000_000L, 42L); // Act & Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/UniAddressTest.java
* 1. Basic constructor validation * --------------------------------------------------------------------- */ @Test void constructorAcceptsNonNullObject() { // Arrange : create a dummy address InetAddress dummy = mock(InetAddress.class); // Act UniAddress ua = new UniAddress(dummy); // Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/SMBProtocolDecodingExceptionTest.java
@Mock Throwable mockCause; @Test @DisplayName("No-arg constructor: null message and cause; can be thrown") void defaultConstructor_behavesAsExpected() { // Arrange & Act SMBProtocolDecodingException ex = new SMBProtocolDecodingException(); // Assert state assertNull(ex.getMessage(), "Default constructor should have null message");
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0)