我正在使用我的测试 gradle testFlavorType
JSONObject jsonObject1 = new JSONObject();
JSONObject jsonObject2 = new JSONObject();
jsonObject1.put("test", "test");
jsonObject2.put("test", "test");
assertEquals(jsonObject1.get("test"), jsonObject2.get("test"));
Run Code Online (Sandbox Code Playgroud)
上述测试成功.
jsonObject = new SlackMessageRequest(channel, message).buildBody();
String channelAssertion = jsonObject.getString(SlackMessageRequest.JSON_KEY_CHANNEL);
String messageAssertion = jsonObject.getString(SlackMessageRequest.JSON_KEY_TEXT);
assertEquals(channel, channelAssertion);
assertEquals(message, messageAssertion);
Run Code Online (Sandbox Code Playgroud)
但是上述两个请求都失败了.堆栈跟踪表明channelAssertion和messageAssertion为null,但不确定原因.我的问题是:为什么上述两个断言都失败了?
下面是SlackMessageRequest
.
public class SlackMessageRequest
extends BaseRequest {
// region Variables
public static final String JSON_KEY_TEXT = "text";
public static final String JSON_KEY_CHANNEL = "channel";
private String mChannel;
private String mMessage;
// endregion
// region Constructors
public SlackMessageRequest(String channel, String …
Run Code Online (Sandbox Code Playgroud) 这是我到目前为止所尝试的内容
func onKeyboardRaise(notification: NSNotification) {
var notificationData = notification.userInfo
var duration = notificationData[UIKeyboardAnimationDurationUserInfoKey] as NSNumber
var frame = notificationData[UIKeyboardFrameBeginUserInfoKey]! as NSValue
var frameValue :UnsafePointer<(CGRect)> = nil;
frame.getValue(frameValue)
}
Run Code Online (Sandbox Code Playgroud)
但我似乎总是崩溃frame.getValue(frameValue)
.
它有点令人困惑,因为文档UIKeyboardFrameBeginUserInfoKey
说它返回一个CGRect
对象,但是当我登录frame
控制台时,它表示类似的东西NSRect {{x, y}, {w, h}}
.
我有分支 A 和分支 B。
在分支 A 上,我有一个带有该名称xyz
的包,我将包名称更改为xYz
. 接下来,我提交所有更改,然后切换到分支 B。现在,一旦切换到分支 A,我更改的包的值仍然xyz
不是我提交的值。这在很多情况下都会发生。
问题: git 是否忽略文件名中的大小写更改,还是这是我的问题?如果有帮助,我正在使用 SourceTree 客户端。