示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldProvideDirectStringArrayAsPublic()
        internal virtual void ShouldProvideDirectStringArrayAsPublic()
        {
            string[] inStore  = new string[] { "a" };
            Value    value    = Values.StringArray(inStore);
            object   asObject = value.AsObjectCopy();

            assertNotNull(asObject, "should return String[]");

            string[] arr = ( string[] )asObject;
            assertTrue(Arrays.Equals(inStore, arr), "should have same values");

            arr[0] = "b";
            assertFalse(Arrays.Equals(inStore, arr), "should not modify inStore array");
            assertTrue(Arrays.Equals(inStore, ( string[] )value.AsObjectCopy()), "should still generate inStore array");
        }
示例#2
0
 private static Test ShouldMatch(string[] propertyValue, object value)
 {
     return(new Test(Values.StringArray(propertyValue), value, true));
 }