File size: 1,086 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | using NUnit.Framework;
using UnityEditor.Performance.ProfileAnalyzer;
public class ProfileDataTests
{
[Test]
public void Save_WithNullData_ReturnsFalse()
{
var filename = "filename.pdata";
ProfileData nullProfileData = null;
bool success = ProfileData.Save(filename, nullProfileData);
Assert.IsFalse(success, "Calling ProfileData.Save with null data should return false.");
}
[Test]
public void Save_WithNullFilename_ReturnsFalse()
{
string filename = null;
var profileData = new ProfileData();
bool success = ProfileData.Save(filename, profileData);
Assert.IsFalse(success, "Calling ProfileData.Save with a null filename should return false.");
}
[Test]
public void Save_WithEmptyFilename_ReturnsFalse()
{
string filename = string.Empty;
var profileData = new ProfileData();
bool success = ProfileData.Save(filename, profileData);
Assert.IsFalse(success, "Calling ProfileData.Save with an empty filename should return false.");
}
}
|