- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 379 for Arrange (0.26 sec)
-
src/test/java/jcifs/NameServiceClientTest.java
@Mock private NameServiceClient nameServiceClient; @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); } @Test void testGetLocalHost() { // Arrange NetbiosAddress expectedAddress = mock(NetbiosAddress.class); when(nameServiceClient.getLocalHost()).thenReturn(expectedAddress); // Act
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransWaitNamedPipeResponseTest.java
// Arrange byte[] dst = new byte[100]; int dstIndex = 0; // Act int result = response.writeParametersWireFormat(dst, dstIndex); // Assert assertEquals(0, result); } @Test @DisplayName("writeParametersWireFormat with offset should return 0") void testWriteParametersWireFormatWithOffset() { // Arrange
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.1K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NodeStatusRequestTest.java
configField.setAccessible(true); assertSame(mockConfig, configField.get(nodeStatusRequest)); } @Test void writeBodyWireFormat_shouldTemporarilySetHexCodeToZero() { // Arrange nodeStatusRequest = new NodeStatusRequest(mockConfig, mockName); byte[] dst = new byte[100]; int originalHexCode = 0x20; mockName.hexCode = originalHexCode;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.9K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/MsrpcLookupSidsTest.java
@BeforeEach void setUp() { // Setup is minimal - mocks are configured per test as needed } @Test void constructor_shouldInitializeWithValidParameters() { // Arrange jcifs.SID mockSid1 = mock(jcifs.SID.class); jcifs.SID mockSid2 = mock(jcifs.SID.class); when(mockSid1.unwrap(sid_t.class)).thenReturn(mockSidT);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransPeekNamedPipeTest.java
// FID is written in writeSetupWireFormat, verify it there } @Test @DisplayName("writeSetupWireFormat should write correct bytes") void testWriteSetupWireFormat() { // Arrange transPeekNamedPipe = new TransPeekNamedPipe(mockConfig, TEST_PIPE_NAME, TEST_FID); byte[] buffer = new byte[10]; int offset = 2; // Act
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbCopyUtilTest.java
@DisplayName("openCopyTargetFile sets correct access flags depending on alsoRead") void openCopyTargetFile_accessMask_respectsAlsoRead(boolean alsoRead) throws Exception { // Arrange SmbFile dest = mock(SmbFile.class); SmbFileHandleImpl handle = mock(SmbFileHandleImpl.class); when(dest.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(handle);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.1K bytes - Viewed (0) -
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/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/internal/SmbNegotiationResponseTest.java
// Arrange when(negotiationResponse.isDFSSupported()).thenReturn(false); // Act boolean result = negotiationResponse.isDFSSupported(); // Assert assertFalse(result); verify(negotiationResponse).isDFSSupported(); } @Test @DisplayName("Test setupRequest method") void testSetupRequest() { // Arrange
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/CredentialsInternalTest.java
@DisplayName("unwrap, domain, anonymous/guest flags happy paths") void unwrap_and_flags_happy(boolean[] flags) { boolean anonymous = flags[0]; boolean guest = flags[1]; // Arrange Subject subject = new Subject(); TestCredentials creds = new TestCredentials("DOMAIN", anonymous, guest, subject, false); // Act & Assert
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.9K bytes - Viewed (0)