Skip to content

Commit

Permalink
Update image paths (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif authored Feb 10, 2023
1 parent a7f8432 commit 7625ea9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
7 changes: 3 additions & 4 deletions src/content/projects/ios-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ tags:
- template
- swift
- swiftui
description:
iOS-base aims to provide developers with an easy-to-use, and easy-to-understand template that can be molded into your needs or used as a guide for building your application.
description: iOS-base aims to provide developers with an easy-to-use, and easy-to-understand template that can be molded into your needs or used as a guide for building your application.
---

<img src="../public/assets/projects/images/ios-base-icon.png" alt="Icon representing the OpenBytes iOS-base template project." width="35%"/>
<img src="/assets/projects/images/ios-base-icon.png" alt="Icon representing the OpenBytes iOS-base template project." width="35%"/>

Let's face it, when you are going to start a new iOS project it would be nice if you could have some boilerplate code ready for you to work with. Something that is tested, has necessary features, and is organized in a readable, and concise manner. iOS-base specifically aims to provide developers with an easy-to-use, and easy-to-understand template that can be molded into your needs or used as a guide for building your application.

This template offers navigation, file storage, notifications, local persistence, and data handling including mock and network objects, and even includes tests and test examples. From here, the world is your oyster, and you can move forward to build out a fantastic, testable iOS application.

### [Visit the Github Repo](https://github.com/0xOpenBytes/ios-base)
### [Visit the Github Repo](https://github.com/0xOpenBytes/ios-base)
29 changes: 17 additions & 12 deletions src/content/projects/t.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ tags:
- testing
- swift
- swiftui
description:
t is a simple testing framework using closures and errors. You have the ability to create a suite that has multiple steps, expectations, and asserts. Expectations can be used to expect one or multiple assertions.
description: t is a simple testing framework using closures and errors. You have the ability to create a suite that has multiple steps, expectations, and asserts. Expectations can be used to expect one or multiple assertions.
---

<img src="../public/assets/projects/images/openbytes-t.png" alt="Icon representing the OpenBytes t-framework." width="35%"/>

<img src="/assets/projects/images/openbytes-t.png" alt="Icon representing the OpenBytes t-framework." width="35%"/>

## What is `t`?

Expand All @@ -28,41 +26,43 @@ description:
## Examples

### t.suite

```swift
t.suite {
// Add an expectation that asserting true is true and that 2 is equal to 2
try t.expect {
try t.assert(true)
try t.assert(2, isEqualTo: 2)
}

// Add an assertion that asserting false is not true
try t.assert(notTrue: false)

// Add an assertion that "Hello" is not equal to "World"
try t.assert("Hello", isNotEqualTo: "World")

// Log a message
t.log("📣 Test Log Message")

// Log a t.error
t.log(error: t.error(description: "Mock Error"))

// Log any error
struct SomeError: Error { }
t.log(error: SomeError())

// Add an assertion to check if a value is nil
let someValue: String? = nil
try t.assert(isNil: someValue)

// Add an assertion to check if a value is not nil
let someOtherValue: String? = "💠"
try t.assert(isNotNil: someOtherValue)
}
```

### t.expect

```swift
try t.expect {
let someValue: String? = "Hello"
Expand All @@ -71,18 +71,21 @@ try t.expect {
```

### t.assert

```swift
try t.assert("Hello", isEqualTo: "World")
```

### t.log

```swift
t.log("📣 Test Log Message")
```

### XCTest

#### Assert suite is true

```swift
XCTAssert(
t.suite {
Expand All @@ -92,6 +95,7 @@ XCTAssert(
```

#### Assert expectation is true

```swift
XCTAssertNoThrow(
try t.expect("true is true and that 2 is equal to 2") {
Expand All @@ -102,10 +106,11 @@ XCTAssertNoThrow(
```

#### Assert is false

```swift
XCTAssertThrowsError(
try t.assert(false)
)
```

### [Visit the Github Repo](https://github.com/0xOpenBytes/ios-base)
### [Visit the Github Repo](https://github.com/0xOpenBytes/ios-base)

0 comments on commit 7625ea9

Please sign in to comment.